Copying inputted information?
On the std::cin line where you input your name, I would like your name to appear on the line after the "So your name is.." line but I dont know how to call the inputted information?
int main ()
std::cout << "Welcome to Carion.\n";
std::cout << "What is your name:";
std::cin >> name;
std::cout << "So your name is.." std::
Just as you were outputting your strings to prompt the user for information, you can output variables as well.
std::cout << "So your name is.." << name;
However I see you declared name as an integer, and not, say, a string; was that really what you wanted?
...why did you post the same question twice?
Last edited on
Topic archived. No new replies allowed.