Since you did not post any code I will guess and say add "cin.ignore()".
This is a common question. A search of the board would probably give more of a explanation. But here are some examples.
This will work.
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Enter hours worked" << endl;
cin.get();
return 0;
}
But this will not.
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Enter hours worked" << endl;
int var1 =0;
cin >> var1;
cout << "Hours worked = " << var1 << endl;
cout << "Press the Enter to continue" << endl;
cin.get();
return 0;
}
This will.
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Enter hours worked" << endl;
int var1 =0;
cin >> var1;
cout << "Hours worked = " << var1 << endl;
cout << "Press the Enter to continue" << endl;
cin.ignore();
cin.get();
return 0;
}
Long story short you need to get rid of the '\n' that was left in the stream. If the search does not yield good results please post back with any questions.