you can use the 'printf();' function from the cstdio built in library to achieve the same speeds of the 'printf' function from the C language and removing the '\n' will also speed up your C++ program.