0
what is the difference in structure and class??
6 Réponses
+ 7
An struct is simply a class with all its member having public access.
+ 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
+ 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.....
0
in structur u can make data types of your choice but in class you can't make
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!!
0
The default members of a structure are public but that of a class are private