M
Miktor
At the minute I am using the following rather unwieldy function to
prevent the console
window in Dev C++ from closing before I can see the output from my
program:
// function to prevent the Dev C++ Console Window from closing
// before I can see the program's output
void keepConsoleWindowOpen ()
{
int any_number;
std::cout << "\n\n";
std::cout << "Please enter a number to end the program:";
std::cout << "\n\n";
std::cin >> any_number;
}
In order to prevent the console window from closing too soon, I call
the above
function with:
keepConsoleWindowOpen ();
This works, but I'm sure it's not the most elegant method to use. Does
anybody else
know of a better way to prevent the console window from closing too
soon when writing
a C++ program in Dev C++ ?
Thanks in advance!
BigBadMick
([email protected])
prevent the console
window in Dev C++ from closing before I can see the output from my
program:
// function to prevent the Dev C++ Console Window from closing
// before I can see the program's output
void keepConsoleWindowOpen ()
{
int any_number;
std::cout << "\n\n";
std::cout << "Please enter a number to end the program:";
std::cout << "\n\n";
std::cin >> any_number;
}
In order to prevent the console window from closing too soon, I call
the above
function with:
keepConsoleWindowOpen ();
This works, but I'm sure it's not the most elegant method to use. Does
anybody else
know of a better way to prevent the console window from closing too
soon when writing
a C++ program in Dev C++ ?
Thanks in advance!
BigBadMick
([email protected])