Hello my friends, I'm Panos and this is my first post here in CBoard Forums
Take a look to my C++ code:
Code:
#include <iostream>
#include <string>
int main()
{
std::cout << "What is your name? ";
std::string name;
std::cin >> name;
std::cout << "Hello, " << name << std::endl << "And what is yours? ";
std::cin >> name;
std::cout << "Hello, " << name << " nice to meet you too!" << std::endl;
return 0;
}
No errors. Let's launch this:
Attachment 9434
Everything work perfect. Now let's launch it again giving two names (firstname & lastname) as input.
Attachment 9435
As you can see, it doesn't prompt me to insert the second name because it uses the my lastname (Georgiadis) and treat it like this way.
Is there any way to avoid this happening ?