how do i do something like this? the reason for me asking is because I don't like using global variables and that's how I used to do it. thanks for your replies
Re: how to add parameters to functions invoked from button events?
[Re: GMorningEstrela]
#301494 12/11/0903:0912/11/0903:09
Hi, thanks for your response. I wrote a poker game and I have a panel button BET that bets a variable amount of money. I used to accomplish this by having a global var that holds this amount. Now, I'm rewriting all my code trying to get rid of global variables as much as possible because I'm going to be combining my code with other similar poker games. What would you suggest the best approach is? Thanks
Re: how to add parameters to functions invoked from button events?
[Re: GMorningEstrela]
#301608 12/11/0922:3412/11/0922:34
create a structure to hold all the global variables for a game then create one instance of this structure. This will basically give you the concept of a name space from c++ and is how it is implemented in some compilers.