true has not been defined. Define it.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
It works fine on my compiler :-S
Try declaring a boolean variable and have that in the while loop
bool keepLooping = true;
...
while (keepLooping)
{
...
}
Or simply use the forever loop
for (;;)
{
...
}
may4life
Junior Poster in Training
57 posts since Oct 2006
Reputation Points: 13
Solved Threads: 2
#include <iostream.h>
iostream.h is outdated - use iostream instead: http://www.devx.com/tips/Tip/14447
(you also either need to put using namespace std; after the inclusion of iostream, or place std:: in front of each Standard Template Library object)
My suspection of "undefined symbol true" is that the compiler is in 'C' mode or something... perhaps in the configuration or something you can change it. In any case, it works fine on mine (gcc).Try declaring a boolean variable and have that in the while loop
Code:
bool keepLooping = true;
...
while (keepLooping)
{
... }
What an awful way of doing it. Firstly, if the compiler doesn't recognize true in the while loop, what makes you think it will recognize it in a variable assignment? Secondly, it's much shorter to simply create a while loop with '1' like the following:
while(1) {
...
}
That should work for ya.
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339