Quote:
Originally posted by redhead
The '\b' is for bell
|
no, '\b' is backspace, '\a' is bell.
Quote:
|
the '\r' will return the cursor to position 1 on the line
|
not necessarily. on some terminals it is a newline, on some it has no effect. if stdout is directed to a file or another program, '\r' will be literally inserted into the stream.
Quote:
|
The line "This is my counter: (number)" will remain on the same line and keep on overwriting previus printed lines, thus only showing current counter number.
|
hmm, doesn't work on my stdout (linux bash). perhaps an fflush() will fix it.