a very close cousin to the keyword 'class' is the keyword 'struct' which is the came as a class, except that its members are public by default. you can declare a struct exactly the same way as a class, and you can give it the same data members and functions. in fact if you follow the good programming practice of always declaring the private and public sections of your class, nothing will be different
No comments:
Post a Comment