View Single Post
Old May 25th, 2006, 5:35 PM   #4
hbe02
Hobbyist Programmer
 
hbe02's Avatar
 
Join Date: Mar 2006
Location: Lebanon
Posts: 148
Rep Power: 3 hbe02 is on a distinguished road
i have a lot of code to be executed instead of cout.. i just couted to make my question breif and straight to the point.
to answer you anyways.. if i used
cout<<"there"<<endl;
This is what i will get:
there
there
there
there
there
there
there
there
.. and forever
but if i use \r before "there" it will just overwrite it instead of priniting after it. so you will only have one ouputed line instead of a kazillion .
i usually use that when im debugging in an infinite loop as such. or to make a counter that keeps incrementing and views on one line only.
hbe02 is offline   Reply With Quote