Class is a userdefined datatype with data members and member functions which can be public or privately accessed depending on access specifiers.Class is static. The attributes of a class always remain unchanged. Class and object both are related to each other, without class, object is of no use and without object, class is useless.
Example :
Code:
struct D
{
int b;
double C;
};
struct E
{
int b;
double c;
C c;
};
// initialize an object of type C with an initializer-list
C c = { 1, 2 };
// D has a sub-aggregate of type C. In such cases initializer-clauses can be nested
D d = { 10, 20, { 1, 2 } };
Bookmarks