+ 1
Difference between classes and structures?
Can we declare functions in a structures like we do in classes or structures are confined only for different data types?
3 ответов
+ 7
Yes struct can have methods. The members in a struct are public by default and in a class they are private by default.
0
In class all the members are private and in structure all members are public this is different