#include <iostream>
#include <string>
usingnamespace std;
class storyline1{
public:
string oldman1(){
cout << " test ";
};
};
int main()
{
cout << " Welcome to Tyler Tongen's first text based game, the decisions you make \n in this game will determine if you survive or not \n \n Goodluck \n." << endl;
cout << " You Wake up on the side of a dusty road \n \n An Old man with a hood and a quiver full of arrows walks up to you \n \n Wake up! There is no time to explain, but you need to come with me!";
cout << " \n 1. Go with the man. \n 2. Run away." << endl;
storyline1 to1;
int x;
cin >> x;
if( x == 1 ){
to1.oldman1();
}
return 0;
};
to void. Note that using other types(other than void) should return values. Say you want it to be string, you just add return " "; which in this case would return it with a value of a single space. Hope this helps. :)