   i need to link up condetional statements
  ok I'm making a text based game with conditional statements and don't know how to link them together so that when you answer one question it gives you the nextpleas help post examples of how it works if you can   
  Why not post what you have working? This way we can tell what is causing you trouble.   ;  I would turn every question into a function. The function prints the question text, parses the user's answer, and then specifies the next question to be asked. This can happen in several ways but will probably happen either by returning the next question (a function) or by setting a "next question" variable through a side-effect. For instance:class Questions{  void (Questions::*next_question)();  int Ask(const std::string &ask, int count)   {    int choice = 0;    do{ std::cin.clear(); std::cin.ignore(); std::cout << ask;    }while (! (std::cin >> choice) && choice > 0 && choice <= count);}   void Welcome()  {    int choice =  Ask("Welcome! Go which way?\n  1. North\n  2. South\n\n", 2);    if (choice == 1) next_question = &Questions::North;    if (choice == 2) next_question = &Questions::South;  }  void North() { .. }  void South() { .. }public:  Questions() : next_question(&Questions::Welcome) {}  bool Step()  {    if (next_question) { this->*next_question(); }    return next_question;  }};;  ok well i have a very basic idea of it but its basically all going to be Q&A i don't know how to link together Q&A's but i know how to write one   ;  You mean something like this ;cout << " Welcome, do you want to play (y/n) ?   : ;char play = 'y';cin >> play;while(play == 'y'){ //run the game;cout<<You died. Do you want to play again ? ;cin >> play; //If yes restart the game. }return 0;};  ya some of it will be y/n but some of it will be 3 choices;Quote:Original post by desballsya some of it will be y/n but some of it will be 3 choicesToohrVyk's program includes an example of a function that gives you N choices:int Ask(const std::string &ask, int count) {  int choice = 0;  do   {    std::cin.clear();    std::cin.ignore();    std::cout << ask;  }   while (! (std::cin >> choice) && choice > 0 && choice <= count);   }