Variables
With std::cin
the >>
operator can be chained to receive more than one inputs.
This code creates the strings my_name
and friend_name
then inputs them.
std::string my_name{}, friend_name{};
std::cin >> my_name >> friend_name;
Make the program receive my_name
and friend_name
as inputs.
my_name
and friend_name
with std::string my_name{}, friend_name{};
.my_name
and friend_name
with std::cin >> friend_name >> friend_name;
.