View Single Post
Old 09-21-07, 11:57 AM   #8
six_storm
Registered User
 
six_storm's Avatar
 
Join Date: Jun 2004
Location: Nashvegas
Posts: 11,575
Send a message via Skype™ to six_storm
Default Re: C++ Gurus, School Me :D

Ok, I got everything worked out. Now my problem is indentation. I'm supposed to take an input file and meet the following conditions when outputting to the screen and output.txt:

1) When a "{" passes thru, go to the next line and indent 6 spaces.
2) When a "}" passes thru, go to the next line and dedent 6 spaces.
3) If you have a nested or two "{", go to next line and indent 12 spaces.

What I can't figure out is how can you tell your program where the end of the line is to "endl;". Any takers? TIA.
six_storm is offline   Reply With Quote