I thought I understood how to access private/protected class member variables using public functions in the same class. But in this case I'm getting compiler errors. Can anyone help?
Errors:
member 'attackDieSides' is a protected member of class 'Character'
member 'die1' is a protected member of class 'Character'
etc...
I don't see a use of a public method to try to get those members. You are just accessing them normally with the dot operator. Could you explain how you think you are doing that?
This is a public member function of class Character. All the variables it is accessing with the dot operator are also in the Character class, in the private section.