Can functions be used in structure definitions? If yes, what are the restrictions on such usage as compared to it's usage in a class.
Printable View
Can functions be used in structure definitions? If yes, what are the restrictions on such usage as compared to it's usage in a class.
None at all.
The only difference is that by default, things are private in a class and public in a struct.