As there are structures present in C++ and we can all operation of classes on structure so why classes are made. What was the need to make them. explain it
Printable View
As there are structures present in C++ and we can all operation of classes on structure so why classes are made. What was the need to make them. explain it
clases are called the blue print without object data can not be accesed .
in java,c++,c# class is used becoz without object it is dummy model.
One difference is Structures are passed using call-by-value and clases are passed using call-by-reference.
Costructors can be declared for structures and it can also be inherited (but default as public), but not sure whether we can perform "operator overloading" with strucutres.