Hi,
I have got a question, is it true that "Classes" that we use in C Program are replacement for "Structure"?
Is their something wrong with "structure" that classes had to be introduced?
Hi,
I have got a question, is it true that "Classes" that we use in C Program are replacement for "Structure"?
Is their something wrong with "structure" that classes had to be introduced?
In C++, structs were extended to have member functions and access levels (private, protected, public), with a default access of public. The class construct, as far as I know, is just a kind of "syntactic sugar" for a struct that has default private access. So both struct and class define "classes", but programmers generally use struct for classes with public data members and class for classes with private data members.