123456789101112131415161718192021222324252627282930313233343536373839404142
#include <iostream> #include <string> using namespace std; int position[] = {0,1,2}; class roomcreation{ public: void setName(string name); string getName(); private: string itsName; }; void roomcreation::setName(string name){ name = itsName; } string roomcreation::getName(){ return itsName; } int main(){ roomcreation room1; room1.setName("Room 1"); string player; string choice; cout << "Please enter a name: "; cin >> player; cout << "Name has been set to " << player << ".\n\n"; cout << "You are in: " << room1.getName(); while(choice != "quit"){ cin >> choice;} return 0;}