Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


storing variables

This topic is 5476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i dont know if thats the right term but, what i want to do in my console app is store an action, so if a character picks up somthing, then later on he needs to use it, it will bring up the varibal saying if he has it or not like hasgun = 0 or hasgun = 1 also whats the code for clearing the screen but not ending the program?

Share this post

Link to post
Share on other sites

either make that variable static or global... will retain value throughout program that way

"Passion is what drives you to stay up until 4am fixing that bug that hardly anyone would notice...Passion is where great games come from, if you dont live and breathe games you shouldn''t be in the games industry." - Dave Pottinger, Ensemble Studios

[GameDev][C++ Page][Game Tutorials][FreeBSD][HawkNL(Hawk Network Library)][NeHe Productions][Gamedev book''s]
[Virtually Online-Books][Mage Tower Ent-My Site]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!