How do I call up a function from anywhere in the program in C++? -


here code:

while (indungeonroom1 == true) {      if (choice == "torch" || choice == "torch" || choice == "pick torch" ||       choice == "pick torch" || choice == "grab torch" ||        choice == "grab torch") {            torch++; 

i want able call function, information anywhere within program, without messing if statements.

you appear programming interactive fiction game. want more structured way of interpreting player input -- in other words, parser. natural language parsing obscenely difficult, there good-enough-for-this-job parsers reuse. recommend through ifwiki's guide authoring systems.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -