Hey guys, I've got a beginner question about this
for some reason the getline function will not work, does anyone know why? I can't seem to figure it out
int main ()
{
string studentname;
int test1, test2;
cout << "Enter first test score";
cin >> test1;
cout << "Enter second test score";
cin >> test2;
cout << "Enter student name ";
getline (cin, studentname);
cout << studentname << "'s average is " << (test1 + test2) / 2.0 << endl;
return 0;
}