I have just started today. I put the following code into DEV-C++:
#include <iostream>
int main()
{
std::cout << "Enter two numbers:" << std::endl;
int v1, v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1 + v2 << std::endl;
return 0;
}
and press compile and run. The program executes but once i've put my 2 numbers in and press 'enter' the program window shuts immediately. Is there any way to change settings so that i can see the output and the window doesn't shut?
Thanks, and sorry for asking the most basic of questions... i will of course be programming flights to Mars this time next year....