Hi all
I have a program in C++ that I compiled on Ubuntu 9.0 and Centos 5, after I got it running on Windows. In this program, I show progress of a process using the following construct:
i = 0;
quantum = floor(total_iterations, 100);
perc = 0;
do
{
remain = fmod(i, quantum);
if(remain == 0)
{
printf("%d percent complete\r", perc);
perc++;
}
i++;
}while(condition);
The progress shows correctly on Windows, i.e., I see "1 percent complete", then "2 percent complete" and so on. However, when I run the program on *nix, the progress does not show. All I see is the final "100 percent compelte"
I can't figure out why this would be the case. Any clue?