49,755 Topics

Member Avatar for
Member Avatar for xCrusade

I am having issues with this program. I am confused on how and what functions to use, how to get my program to get the information from a file, and I am extremely confused on arrays. I've been reading this chapter relevant to the problem through and through and I …

Member Avatar for Chris911
0
3K
Member Avatar for lotrsimp12345

I am trying to implement a hopfield net to learn patterns. This is what I current have.... I am current having it create a random number of patterns based on the number of neurons Next I am trying to make a weight matrix Should I have a seperate weight matrix …

Member Avatar for lotrsimp12345
0
487
Member Avatar for mommabear

I finished the lab, and everything works, but I just don't like the way it looks...a bit disjointed to my eye. I'm happy that it works, but I want to write robust, readable code as well as functional. So, if you're interested (have spare time) would you take a look …

Member Avatar for Clinton Portis
0
263
Member Avatar for vuhailuyen

I am working on a Dictionary project based on AVL tree. The Dictionary can add words from the input.txt. Here is the input example: 0 3 sheep,con cuu mother, me water, nuoc 0 : the code to show that you are about to add words to the Dictionary 3 : …

Member Avatar for vuhailuyen
0
123
Member Avatar for bubbleT

In my C++ program, I'm using ShellExecute command with last parameter as SW_SHOWMAXIMIZED to open a web page (.aspx). [CODE] ShellExecute(NULL,"open","http://localhost/WebApp/default.aspx?Page=0",NULL, NULL, SW_SHOWMAXIMIZED); [/CODE] The Internet explorer can open this web page in its maximized state if I did not set the Window Title of IE in the registry (HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\Internet …

0
61
Member Avatar for Cqinzx

Hi I have an assignment where I was given a data file and put it in an array. The file looks somthing like this: [CODE]Smith John 78 70 76 72 82 84 Doe Jane 72 76 77 90 76 45 Weathers April 64 93 95 83 66 56 Brown James …

Member Avatar for Clinton Portis
0
212
Member Avatar for BimBam

Hi guys, I'm trying to use a function which returns a pointer to a vector element, but it doesn't really work - and since I'm not so experienced in C++ and especially pointers, hoped that someone could help me out. The function is defined as [CODE]Obj* MyClass::FindObj(std::vector<Obj*>&, string Label_){ ... …

Member Avatar for jonsca
0
166
Member Avatar for Jeddahforever

Hi guys i spend 3 weeks doing this project , but i don't know how to start implement the Delete and update , can u please help me guys .? here is my attachment and my code [CODE] #include <iostream> #include <fstream> #include <cstring> #include <cstdio> using namespace std; class …

Member Avatar for Ancient Dragon
0
123
Member Avatar for kerp

Hi, I've ran into a problem with pointers which I can't seem to get my head around. Here's some code that illustrates my problem. [CODE]void Reallocate(char* Source) { int NumberTest = 0; char* Buffer = new char[4]; memcpy(Buffer, Source, 4); delete[] Source; Source = Buffer; memcpy(&NumberTest, Source, 4);//This puts the …

Member Avatar for kerp
0
116
Member Avatar for glamourhits

write an instruction to instantiate an object named individ of a class named group. plese help .. thank you

Member Avatar for daviddoria
0
65
Member Avatar for mkowlowitz

What are you using to keep track of your bugs? I use [url]www.elementool.com-[/url] it is pretty cheap and web-based, which is fine for my needs. Just wondering what the rest of you guys are using?

Member Avatar for daviddoria
0
50
Member Avatar for abarkwith

Hi, I'm relatively new to programming and would like to know how to suspend a c++ program until another program has created a certain file in linux. While it is waiting it needs to be using a minimal amount of processing power. Hope that made sense? Cheers, Andy

Member Avatar for nezachem
0
58
Member Avatar for claudiordgz

Hi guys, I need help on getting the minimal scope on something. I am learning data structures, right now i'm figuring out how to insert my class information (strings, ints, floats) into my node class. Do i need to send data to my node each by each type? or is …

Member Avatar for thelamb
0
171
Member Avatar for glamourhits

write the header for a function named school which is public member of the class course, returns a string data type and includes 2 integer papameters named mark and grade.. i really don't know how to do that . any 1 please help .. thank you !!

Member Avatar for alaa sam
0
83
Member Avatar for Firo

Mhm, so, the problem I'm having here is that, once the "while (!boatList.eof())" cycle reads the first line (EDIT: I meant, how should I put it, the first "segment"), it goes on infinite (?) loop reading the other one. [QUOTE]AX 777 Valtis 0 4 500 2007 5.5 -1 50.2 6 …

Member Avatar for Fbody
0
177
Member Avatar for glamourhits

class cube; private; float s1, s2, s3; public; void print(); float area (float, float, float); } the following class in incorrect any know how to write it correctly .. thank you Very Much For Help ..

Member Avatar for alaa sam
0
86
Member Avatar for alaa sam

hi can i have a clock in my program when it runs the clock keep running like the computer time? and how?

Member Avatar for Ancient Dragon
0
63
Member Avatar for sadsdw

Hi friends, I would like to insert "whitespace" between the numbers of my string str3 and after concatenate with str1 and str2, as str1 << str2 << str3. This is an example: E.g.: 200 3 1 2 3 4 5 6 7 8 9 Could you help me? I had …

Member Avatar for sadsdw
0
95
Member Avatar for ShawnCplus

As the title says: Is the XOR Swap algorithm still viable? I know that temp-swaps are supposedly faster but the shear coolness of an XOR swap makes it more attractive to me. What do you guys/gals think? For anyone that doesn't know what an XOR swap is here goes [code=c++] …

Member Avatar for arkoenig
0
211
Member Avatar for steve_Student

Hi can any one help me with my if / else statement, I have an assignment which has to give discounts to phone calls depending on the time of call or the day. Here are the discounts Starting Time--------------Monday to Friday-------------Saturday and Sunday Before 8am-----------------40% discount-----------------60% discount 8am to 4:59pm--------------Regular …

Member Avatar for Jason Giggs
0
140
Member Avatar for knellgust

[CODE]#include <iostream> using namespace std; class NumDays { private: double hours; double days; public: NumDays(double h=0) { hours=h; }[/CODE] [ICODE] how can I assign values to both hours and days, but only takes in the number of hours as its argument? I don't know how to assign the days without …

Member Avatar for xikkub
0
223
Member Avatar for xikkub

Using GLUT, moving my mouse in the display window causes the animation to increase in speed. When running at an initial 60fps, moving the mouse causes the animation to accelerate and increase to 1000fps. My data might be wrong, but there is definitely a timing issue. I've tried implementing a …

Member Avatar for xikkub
0
304
Member Avatar for acv528k

Hello everyone! I'm fairly new to C++ and am having trouble with a "nested loops" problem. Here is the problem: USING A WHILE LOOP, get integers from the user. Then, USING A FOR LOOP, calculate a 'times table' of that number and the numbers between 1 and 20. When the …

Member Avatar for Fbody
0
128
Member Avatar for Mona..

Hi.. I want to compress a text file which is like this:(input.txt) [CODE] ffa11 ffb13 ffd2 e c e r [/CODE] and save the result in (output.txt) [CODE] #include<fstream> #include<iostream> using namespace std; int main() { char ch; int counter=0; fstream infile; fstream outfile; infile.open( "input.txt",ios::in ); outfile.open( "output.txt",ios::app ); …

Member Avatar for xikkub
0
1K
Member Avatar for kyuu

hi i am making a 16puzzle game and i keep getting error about parameter conversion in main function. maybe someone can help me out and figure out whats wrong? i had this program written with functions and it worked perfectly,but now making it with classes(coz my teacher requires classes in …

Member Avatar for Fbody
0
167
Member Avatar for Philosophy

I am working on an Encryption/Decryption program for class and have run into a problem. I seem to have gotten the encryption correct, but I am unable to decrypt what was encrypted in order to get an output equal to what originally went in. Here is the code I have …

Member Avatar for Philosophy
0
245
Member Avatar for svampizen

Hello Im new with c++ but I'am trying to make a space invaders game.... This is a loop that is shooting... [CODE] if(skott1aktiv) { masked_blit(skott, screen, 0,0,skott1x,skott1y, 32,32); skott1x+=skott1dx; uppdatera= true; if(skott1x>639 || skott1x<0) skott1aktiv=false; } rest(10); } [/CODE] Does anyone know how to make the shoot go up instead …

Member Avatar for alexchen
0
49
Member Avatar for MixedCoder

[CODE] #include <Windows.h> #include <iostream> #include <mysql.h> using namespace std; int main() { MYSQL *conn; char names; names= mysql_query(conn,"select * from names"); return 0; } [/CODE] error: Error 1 error C2440: '=' : cannot convert from 'int' to 'char *' i want to set a varuable for the query so …

Member Avatar for gerard4143
0
205
Member Avatar for Jason Giggs

Hey.. Can anyone suggest me must do projects in c++ so that i can become used to it a develop a little confidence. Small games, apps would be appreciated.

Member Avatar for Fbody
0
113
Member Avatar for newbiecoder

Hello, as I learned conio.h header file is used in Windows not Linux, I found two things from the Internet 1. Linux c++ implementation of conio.h [URL="http://sourceforge.net/projects/linux-conioh/"]http://sourceforge.net/projects/linux-conioh/[/URL] 2. libconio [URL="http://sourceforge.net/projects/libconio/"]http://sourceforge.net/projects/libconio/[/URL] What should I do to use them? I am not very familiar with C++ and I couldn't find out myself.. …

Member Avatar for jonsca
0
169

The End.