Why do std::cout and printf() not print between usleep() delays?

前端 未结 1 1922
野趣味
野趣味 2021-01-27 13:35

i have a program that is supposed to print \"Hello, World!\" in slowly scrolling text. I am using the unistd.h library for the usleep() function, and i\'m using std::cout to pri

相关标签:
1条回答
  • 2021-01-27 14:15

    You might need to flush the output stream.

    0 讨论(0)
提交回复
热议问题