Accessing variables of another class

Aug 3, 2013 at 3:36am
I've been attempting to create a game with curses and I keep running into the problem of scope. I want to change or use variables of a different class in a different header file. But I don't know if I should use pointers, references or neither. Should I be programming in a manner that doesn't make it necessary to use variables outside of their class?
Last edited on Aug 3, 2013 at 3:36am
Aug 3, 2013 at 5:28am
You can, but don't.

Provide inline access functions on the class and call those instead.
Topic archived. No new replies allowed.