|
The slight difference between a struct and a class in C++
There is a difference that neither person who posted so far mentioned- all members of a struct are public by default, and all members of a class are private by default. Right now I'm trying to decide when it is appropriate to use a struct in my code (I'm strictly a C++ programmer)- I guess I am not convinced it is ever a good idea, at least with objects that are written to and read from disk. I'm still undecided for certain though.
|