0

what is the difference in structure and class??

29th Jun 2016, 4:18 PM
BARUN SARRAF
BARUN SARRAF - avatar
6 Réponses
+ 7
An struct is simply a class with all its member having public access.
29th Jun 2016, 4:41 PM
Garme Kain
Garme Kain - avatar
+ 2
The only difference between classes and data structures is that classes have their members private by default while data structures have them public by default
30th Jun 2016, 12:33 AM
Francesco Galisi
Francesco Galisi - avatar
+ 1
I general.. a structure is used to pass variable as arguments....for example if you have to pass a long list of arguments ....you just fill up a structure and pass it to a func .. class is used to define something with variables and methods.....
29th Jun 2016, 5:20 PM
Mukul Kumar
Mukul Kumar - avatar
0
in structur u can make data types of your choice but in class you can't make
29th Jun 2016, 8:11 PM
Sohaib Ahsan
Sohaib Ahsan - avatar
0
a structure is used to create a group of variables while a class can be used to both collect variables and functions under a same name!!
30th Jun 2016, 2:41 AM
Akshay Kakoriya
Akshay Kakoriya - avatar
0
The default members of a structure are public but that of a class are private
30th Jun 2016, 6:41 AM
Desik
Desik - avatar