Question on printing out a line
Posted on 2004-09-22
Hello, I'm trying to print out one line at time from a file once it each reaches a part of my progam. This is what I have right now!
while(lexreturn != 41)
cout << "\n" << endl;
cout << line << endl;
lexreturn = lex();
What is happenning is that it will reach this while loop while it's not end of file and I want it to print out a line at time. For example, if the file looked like this;
number : Real;
The output would be this:
PROGRAM aProgramName(); <- this is what i want
PROGRAM [program] ,-This is not important for this problem
number : Real; <- this is what i want
etc... -This is not important for this problem
How would I go about doing this? I hope that I am making this clear!