C++ cout printing slowly

前端 未结 8 2063
情深已故
情深已故 2020-11-30 14:23

I noticed if I print out a long string(char*) using cout it seems to print 1 character at a time to the screen in Windows 7, Vista, and Linux(using putty) using Visual C++ 2

8条回答
  •  隐瞒了意图╮
    2020-11-30 14:40

    Try call ios::sync_with_stdio(false); before using std::cout/cin, unless of course, you mix stdio and iostream in your program, which is a bad thing to do.

提交回复
热议问题