Menu

Dev++ command line, new to this

2009-03-05
2012-09-26
  • Dash Masterful

    Dash Masterful - 2009-03-05

    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++

     
    • cpns

      cpns - 2009-03-06

      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

       
    • Dash Masterful

      Dash Masterful - 2009-03-06

      thanks man, big help you are!

       
    • Dash Masterful

      Dash Masterful - 2009-03-06

      which icon are you talking about on the console window, "click the icon on the title bar", thanks

       
      • cpns

        cpns - 2009-03-06

        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.

         
        • cpns

          cpns - 2009-03-07

          ... further, on the title bar to the left, where it is for every Windows application. ;-)

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.