I'd like to start off by saying I was hesitant to post and will not request help coding or debugging directly because I realize a language is best learned through self gained experience.
With that out of the way, my question is simple.
When searching google or other resources, what keywords would you guys recommend using to accomplish the following goal:
Create a starting location in the main function. (location1 for example)
& Display options so a user may switch from location1 to location2 or 3.
NOTES:
-the user will be asked for input to move
-for example, they can type sect2 to move from the starting point(sect1) to section2
-please excuse any grammar errors in this post, it was a bit rushed
If my concept is not well defined please feel free to ask questions. If you understand, then all I ask for is the keywords I would need to find the knowledge I seek. :)
Below is the code I will be adding to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#include <iostream>
#include <string>
using namespace std;
char playername[20];
string mo_s1("move s1"), mo_s2("move s2");
string sm_s1("sm in s1"), he_s1("he in s1"), to_s1("to in s1"), ta_s1("ta in s1"), se_s1("se in s1");
string sm_s2("sm in s2"), he_s2("he in s2"), to_s2("to in s2"), ta_s2("ta in s2"), se_s2("se in s2");
string sm_s3("sm in s3"), he_s3("he in s3"), to_s3("to in s3"), ta_s3("ta in s3"), se_s3("se in s3");
int main()
{
int n;
cout << "blahblah someone asks, 'Who are you?'\n";
cout << "\n \n" << "...";
cout<<"your name: ";
cin >> playername;
cout << "\n" << "It's me, " << playername << ". remember?";
cout << "\n \n" << "press enter to continue, type 0 to quit";
cin >> n;
return 0;
}
|