Thread: text game
View Single Post
  #16 (permalink)  
Old November 21st, 2006, 08:23 AM
Geo121 Geo121 is offline
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

Well . . .

To follow those exact steps you would create the class

declare a pointer of it in the main function

send it's variables into the function and then when the function modifies the value of the pointer

it actually modifies the number globally

NOW ON THE OTHER HAND

this does work but is very sloppy

what I would do is add the function to the class

then you can access all of the variables in your class through that function

so you could make a function that increments each variable

and a function that outputs each variable

and everytime you want to add to that variable just call the function

=P

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote