I have a class named "State_Game", which has an opaque [struct Data] private by default:
Then I put the definition in the main source file:
data.asdf = 5; // Works just fine
However, as you can see, I'm still able to use that variable outside of State_Game, despite the structure is "private" inside the class (or not?).
Defining the struct as static also works, by the way:
static struct State_Game::Data
So why am I still allowed to do this? Isn't it supposed that "data" should be private inside State_Game?
I'm sorry if this sounds too obvious or something, really, but I'm just a little confused. It's been long since I programmed something in C++ (I use C for almost everything).