hello everybody,
here is my problem:
________________________________________
#include <stdio.h>
int main()
{
int i=10;
printf("value is %i",i);
return 0;
}
_________________________________________
when i compile and execute, nothing appears on screen!!
but if i replace the printf line with this one:
printf("value is %i\n",i); // i just added a \n
then i can see the line displayed on my screen.
ok, that's allright, but what if i want to display something _without_ the \n ?
someone told me it was a classic buffer problem and adviced me to use fflush()
but when i write:
printf("value is %i",i); fflush(stdout);
nothing happens. i also tried to put fflush(stdout) before the printf, because i don't know how to use this function correcly, but nothing happened.
can someone explain me what's the matter?!!
im using Linux Mandrake 8.0
thanks