Help I need a remember thingy!!!

I am making a menu and on the menu there is a clan section so when you play online you can have clans so this is the little code for the clan name,



case 3: cout << " Enter your clan name and press return: ";
break;

I need something on it that will remember the name that the person types in like if it was Bob then at that bottom it would say clan name: Bob, can someone help??
They're called "variables". Since you want to remember a string, you'd use the std::string type:

1
2
3
4
5
6
7
#include <string>  // <- add this to your #includes

//...
std::string clanname;
std::getline( std::cin, clanname ); // <- gets one line of text from the user, puts it in "clanname" variable

std::cout << "your clan name is " << clanname;
Topic archived. No new replies allowed.