troubles with c++

Towards the end of my code I have a cout statement to return the input if the input was in fact a integer (getNumber). The problem is when it prints the outcome, it says something like 1.74419e-39....no matter what the numberic input was what should I do differently?
1
2
3
4
5
6
7
8
9
10
11
12
while(true){
 cout << "Enter a number (Type 'done' to calculate) : ";
					 
//Checks to see if the input is integer
getline(cin,checkInteger);
			
stringstream intStream(checkInteger);
if (intStream >> mainMenuSelection)
	break;
cout << "\n\n\n\n\nInvalid number, try again" << endl;
}
cout << "You entered: "<< getNumber << endl;
You are reading 'mainMenuSelection' -line 8- and displaying 'getNumber' on line 12
oh, duh...thanks for the quick reply
Topic archived. No new replies allowed.