Sometimes people wonder why there is Struct and Class in C++ language. They have identical functions except that all the variables defined in struct are public by default and those defined in C++ are private by default. The need for both of these to coexist seems redundant. This is where one needs to go the history of c++. The struct was very much a part of C language and to evolve in to a much richer form, Class was an invention so that it would give a choice / flexibility for people who wanted to stick to struct or change to Class.