So this is pretty basic, I want to print to the screen 2000 different numbers each on a new line, but when I print out, it only shows the last 200-300 numbers, not all 2000, how can I change so that all 2000 print to the screen, I'm compiling with C not C++
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another option is to either redirect the text to a file or write to a file programatically and then simply use a text editor. To redirect standard output, run the program as follows:
myprog > output.txt
Yet another option is to pipe the output to the 'more' utility thus:
myprog | more
this causes the output to pause when the screen is filled until you press a key for the next 'page' of output.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So this is pretty basic, I want to print to the screen 2000 different numbers each on a new line, but when I print out, it only shows the last 200-300 numbers, not all 2000, how can I change so that all 2000 print to the screen, I'm compiling with C not C++
In your program's console window, click the icon on the title bar. Select Properties->Layout, and change "Screen Buffer Size"->"Height" to 9999
You can also do that programatically using the Win32 console API: http://msdn.microsoft.com/en-us/library/ms682073.aspx Specifically the SetConsoleScreenBufferSize() function http://msdn.microsoft.com/en-us/library/ms686044(VS.85).aspx
Another option is to either redirect the text to a file or write to a file programatically and then simply use a text editor. To redirect standard output, run the program as follows:
myprog > output.txt
Yet another option is to pipe the output to the 'more' utility thus:
myprog | more
this causes the output to pause when the screen is filled until you press a key for the next 'page' of output.
Clifford
thanks man, big help you are!
which icon are you talking about on the console window, "click the icon on the title bar", thanks
Usually a black square with a C: command prompt in it. How many icons do you have!?
Alternatively you can simply right-click anywhere on the title bar. This is not anything to do with Dev-C++ but normal behaviour of Windows.
... further, on the title bar to the left, where it is for every Windows application. ;-)