c++ - How can I increase terminal buffer size? -
given below simple program, print 10,000 integers each in separate line. but, integers @ top disappear, lower statements executed. 296 integers displayed @ once. how should take care of this, , 10,000 integers on screen @ once i.e. how can increase terminal buffer size?
#include <iostream> main(){ int i=10000; while (i){ std::cout<<i<<"\n"; i--;} int ch = std::cin.get();}
compiler : cygwin gcc 4.9.2 ide : codeblocks.
actually integers correctly displayed. can verify redirecting program output file:
$ ./yourprogram >yourfile.txt
and showing first few lines of output file:
$ head yourfile.txt 10000 9999 9998 9997 9996 9995 9994 9993 9992 9991
the problem report caused limited terminal buffer size.
Comments
Post a Comment