Originally Posted by
Jayzan
Is it possible to call a Public Variable or Public Function(which contains public variables) from outside of main & the Class, in a function that is defined as such: void Classname::Example() ?
-- I can only get it to work in functions defined as above if they don't include the public variables or public calls. I also have created the object name as Cassname e; and use the variables or functions called as e.playername; or e.playerattack(); but this doesn't seem to work. I know I must be missing something. As a workaround, I've just been defining and using the public functions inside of the Class. I'm starting to wonder if class variables/functions can only be called from inside of Main.