+ 1
What is difference between a structure and class?
6 Answers
+ 1
in c++ a struct is simply a class with members public by default:
struct app { class app {
int value <=> public: int value;
}; };
0
Class
it is identifiable entity that share common characteristics & behaviour with object
Structure
collection of data items in desired manner
structure can only have the parameterized constructor.it means a structure can not have non-parameterized constructor default constructor and destructor.