Class definitions I see out there, the public member-data and functions(though they most likely depend on private ones) are declared/defined before the private ones. I know the order has no effect, but is this like a standard convention? If yes, please what is the reason behind it
When you're using a class you're interested in public members only. When they are on the top they are easier to find.
Ensure all public entity (written top) can be accessed by lower access method (protected & private). Order do has effect.
It doesn't matter where method are defined. As along as they are used after definitions. And it's more likely that private methods and members are used by public ones. Not the other way around.
Обсуждают сегодня