Mail Archives: djgpp/2001/05/16/07:00:16
Michiel de Bondt <michielb AT sci DOT kun DOT nl> wrote:
> Hello,
> I did not found this question in the FAQ. I use cprintf some times
> and then I use printf. But a few times, the printf is done at an old
> cursor position, i.e. the cursor is there somewhere in the middle of
> the cprintfs. The cprintfs are not affected, i.e. they are not done
> from the position after the printf, but from the right position.
> So I wish to know the console variant of fflush (stdout) for standard
> output.
There is none --- cprintf() isn't buffered, so it doesn't need any
fflush workalike, to begin with. Instead, you'ld have to be sure you
fflush(stdout) before any cprintf() or gotoxy() call following a
printf().
The basic problem is that you simply should not mix cprintf() and normal
printf(), like that. There's no good reason to do so, anyway. If you're
going to use cprintf(), use it for all output.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -