发现可以实现原地输出,具体就是下载百分比那个位置,但
1,在本机上执行,可以实现
2,通过telnet远程操作时,显示的数据不能实现原地输出我的输出代码如下,请指教,谢谢。 {
   float Percent=0;
    Percent =(float) dwBytes/dwByteToRead;
    HANDLE hConsole = GetStdHandle ( STD_OUTPUT_HANDLE );
    CONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo;
    GetConsoleScreenBufferInfo(hConsole,&ConsoleScreenBufferInfo);
    ConsoleScreenBufferInfo.dwCursorPosition.X = 0;
     SetConsoleCursorPosition ( hConsole, ConsoleScreenBufferInfo.dwCursorPosition );
    printf("%d/%d  %.2f%%\n", dwBytes, dwByteToRead,Percent*100);
    fflush(stdout);
}