Forum: C++ Feb 25th, 2009 |
| Replies: 3 Views: 298 Just observe the following code snippet:-
if(send = true)
cout <<"You have passed the exam!\n";
else if (send = false)
cout <<"You have failed the exam.\n";
Watch both the conditions... |
Forum: C++ Jul 4th, 2008 |
| Replies: 9 Views: 2,981 I think that was an important information u left out ;)
Yep, it does go into the infinite loop, but so does the first one.
But why exactly its occurring I cant figure it out, I hope some of the... |
Forum: C++ Jul 4th, 2008 |
| Replies: 9 Views: 2,981 Tried you code out in GCC 4.1.2, no problems, same output for both cases, no infinite loops!!
I had directly copy pasted your code. |
Forum: C++ Jun 23rd, 2008 |
| Replies: 6 Views: 1,356 Note the semicolon next to the while loop,
while(getc(pFile)!=' ');
Thanks to that, your while continues to run and skip all the characters on the line until it finds a ' ' <space>.
Just... |
Forum: C++ Jun 23rd, 2008 |
| Replies: 7 Views: 512 I just checked "Var" and "Var2" are both "char" types, I think you can use "==" directly for checking for equality.
Following is the signature for strcmp ->
int strcmp( const char *str1, const... |
Forum: C++ Jun 23rd, 2008 |
| Replies: 7 Views: 512 Have u added #included<cstring> in the file which contains your class definition(ppoly.h).
you will need it for the strcmp() function which is on Line 51 |
Forum: C++ Jun 21st, 2008 |
| Replies: 2 Views: 717 You need to compile C++ programs in GCC using g++ and not gcc.
g++ filename |
Forum: C++ Jun 17th, 2008 |
| Replies: 5 Views: 761 Hi Yuichi,
My suggestion is almost similar to Alex's, only looking at your prigram I think you should not only declare your array which which is holding the queue as global, but also a variable... |