-
looping problem
Code:
while((quit=getc(stdin))!='q');
print crap
p ++;
i'm trying to make a loop that keeps going if the user pushes 'enter' and will quit when they hit 'q' ..
so far this just prints one line.. and if you hit enter it just keeps on pumping out blank lines...
can someone help me... i'm just switching to C from C++ and i'm not used to the input functions yet.
thanks,
John
-
http://www.stud.ntnu.no/~shane/stasj...ilder/192.html
And then get rid of the ; at the end of your while loop.
-
hahahaahhaah
nice -- i deserved that...
thanks man
john