I want to display more text in my console

When I run my program, I would like more text to be able to fit on the console. I need 5000 or so lines, when I am only getting around 1000. I am using double for my variables, which is more than enough. The "Defaults" and "Properties" in console didn't seem to have the answer. My compiler is Dev-C++. Thank you.
Once you've brought up your command prompt, click on the program icon thingy up on the upper-left corner and click properties. Under the layout tab you can increase your console buffer size. I don't know if that'll work for you but it did on W2k. If you want a solution for your program, I don't know, besides outputting to a file.
closed account (z05DSL3A)
Here is some code to set the screen buffer programmatically:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <windows.h>
#include <iostream>

int main(int argc, char argv[])
{
    HANDLE hStdout;

    hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
    
    COORD newSize;
    newSize.X = 80;
    newSize.Y =5000;

    // Should check returned value for errors!!
    SetConsoleScreenBufferSize(hStdout, newSize);

    for(int i = 0; i < 5000;i++)
    {
        std::cout << i << std::endl;
    }

    return 0;
}


For more info on SetConsoleScreenBufferSize ... See MSDN
http://msdn.microsoft.com/en-us/library/ms686044(VS.85).aspx

HTH
Last edited on
Thanks arrrgh, but yours didn't help. Thank you Grey Wolf for your answer solved my problem.
Topic archived. No new replies allowed.