When I compile and run my programs in Dev C++, the output window opens and shows the output. Then instanlty the window flashes and disappears.
How do I make the window stay long enough for me to read the output??
Thanks
The program that launches the program can start it minimized. I don't think there is a way to set this on your application programmaticaly. Have a look at 'start' in a command prompt to get an idea or you can do is create a windows shortcut that starts your program minimized which also. I am using Dev C v5.6.1 IDE on Windows7. I have written a C code which has hundreds of line that are displayed as output on screen. The buffer size of Console Windows is small and I cannot view the initial printf statements. This example demonstrates the SetWindowSize method, and the WindowWidth and WindowHeight properties. You must run the example to see the full effect of changing the console window size. The example reports the dimensions of a console window set to 85 columns and 43 rows, then waits for a.
twomers408
The problem is (not really a problem), that the program is running too fast and doesn't have anything to stop it from closing. There are a number of options to solve this, most of them are mentioned here -- '>http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1043803465&id=1043284385 so if you're using C++ throw a -->
cin.ignore(); and cin.get(); before you return 0; at the end of your program
Definition
Sets the height and width of the console window to the specified values.
Parameters
The width of the console window measured in columns.
The height of the console window measured in rows.
Exceptionswidth or height is less than or equal to zero.
-or-
width plus WindowLeft or height plus WindowTop is greater than or equal to MaxValue.
-or-
width or height is greater than the largest possible window width or height for the current screen resolution and console font.
The user does not have permission to perform this action.
An I/O error occurred.
The current operating system is not Windows.
Examples
This example demonstrates the SetWindowSize method, and the WindowWidth and WindowHeight properties. You must run the example to see the full effect of changing the console window size.
Dev C++ Hide Console Windows 10
The example reports the dimensions of a console window set to 85 columns and 43 rows, then waits for a key to be pressed. When any key is pressed, the dimensions of the console window are halved, the new dimensions are reported, and the example waits for another key press. Finally, when any key is pressed, the console window is restored to its original dimensions and the example terminates.
Hide Console Window C++Applies toComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2020
Categories |