Independent and ambiguous variables

Ok so how do i make variables that are not part of any function but can be changed by other functions in the program....im trying to write a text game and i need this so i can have the inventory values per se i wanted the following:
1
2
bool knife = "false";
bool key = "false";

to run properly outside of a function
WHY in this insane world are you trying to assign a constant character array to a boolean?

-Albatross

P.S.- Jk.

P.P.S.- Just define them outside of any functions. That's perfectly fine. There's a harder and neater trick using pointers, but I won't get into that.
Last edited on
Topic archived. No new replies allowed.