I recently just started learning C++ and i was just messing around trying to create a first and simple program. I cant see to figure out why it wont output the last line. Can someone tell me why? Thanks in advance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
#include <string>
usingnamespace std;
int main ()
{
string mystr;
cout<< "What is your name? ";
getline (cin, mystr);
cout<< "Hey " << mystr << ", What are you up to? ";
getline (cin, mystr);
cout<< mystr << "That's cool! Me Too!";
return 0;
}