There is no much difference between a class and a structure and the slight difference is the default scope of class is private where as the default scope of structure is global.
There is no much difference between a class and a structure and the slight difference is the default scope of class is private where as the default scope of structure is global.
a>the data members of a class are private by default where as those in structure are public.b>class can have the destructors while the structures cannot have.
Firstly, a class is not declared in C.Secondly, in C++, the main difference is all the data members and member functions in classes are private by default whereas for structure they are public.
In C++ thr is no difference in class and structure except that in class by default scope is private but in structure its public...other than that no other difference.