try using \r
instead of \n
when printing the new “version”.
for(int i=0;i<=100;++i) printf("\r[%3d%%]",i);
printf("\n");
More Related Contents:
- How do I output coloured text to a Linux terminal?
- Command working in terminal, but not via QProcess
- Clearing terminal in Linux with C++ code
- What’s the difference between 'gcc -g' and 'gcc -g3'?
- How to extract a multiline text segment between two delimiters under a certain heading from a text file using C++ [closed]
- How to judge an address as legal or illegal by it‘s numerical value? [closed]
- How to allocate memory dynamically for class using new in C++?
- expected unqualified-id before ‘.’ token
- Easily measure elapsed time
- usr/bin/ld: cannot find -l
- Extracting text OpenCV
- Hide password input on terminal
- Compiling multithread code with g++
- Linux: Executing child process with piped stdin/stdout
- How do you find what version of libstdc++ library is installed on your linux machine?
- C++ compiling on Windows and Linux: ifdef switch [duplicate]
- Difference between shared objects (.so), static libraries (.a), and DLL’s (.so)?
- How can I compile and run C/C++ code in a Unix console or Mac terminal?
- How to check what shared libraries are loaded at run time for a given process?
- Clearing output of a terminal program Linux C/C++
- How can I execute external commands in C++/Linux?
- How can I set the baud rate to 307,200 on Linux?
- Linking problems due to symbols with abi::cxx11?
- Cross Platform Floating Point Consistency
- How to name a thread in Linux? [duplicate]
- Why is CUDA pinned memory so fast?
- counting the number of lines in a text file
- How to implement readlink to find the path
- Why does the free() function not return memory to the operating system?
- Locking files in linux with c/c++