+ 2

What is the difference between class and structure in c++?

20th May 2018, 12:59 PM
Arshiyan Rahman
Arshiyan Rahman - avatar
5 Réponses
20th May 2018, 1:13 PM
Rahul George
Rahul George - avatar
+ 2
The only difference in C++ is that class members and inheritance are private by default, while struct members and inheritance are public by default
20th May 2018, 1:13 PM
aklex
aklex - avatar
+ 2
Behind that say aklex thare is a semantic difference.. struct its used for make data agglomeration (only data) while class its used for define a type with data and behaviours
20th May 2018, 1:31 PM
KrOW
KrOW - avatar
0
we cant write functions it and once structures are created can b accesd by any one in class we have three access specifier
23rd May 2018, 4:03 PM
Shivali Bandi
Shivali Bandi - avatar