0
Differentiate a structure and class
3 Respuestas
+ 2
Yes, that's it. Structurs originate from C, where you don't have classes and they wanted to keep everything C had. Classes are there because C++ is oop language.
+ 1
The difference is:
1. Members of class are by the default set to private, and in structure they're set to public.
Private means you may only access the members from the inside of the class, while with public you may do it from everywhere.
2. Classes have methods, while for structures you use functions.
+ 1
that's it?..or still more..