hi whenever i compile my programs with devcpp and then run it i hav this problem where my program ends whenever i press enter after i type in stuff to fill my variable.
for example:
Code:
#include <iostream>
using namespace std;
int main()
{
int num;
cout << "enter a number";
cin >> num;
cout << "the number you enterd is: " << num << endl;
return 0;
}
this program ends right after i enter a value for num. it never gets to the cout statement at the end. this problem is not just specific to that program i just wrote. i have the same problem for every program in which i have to enter a value from the keyboard to fill a variable. could someone tell me how i can fix this problem?