View Single Post
Old 01-29-2008, 01:16 PM   #5 (permalink)
zlatnik
Recruit
 
Join Date: Jan 2008
Posts: 1
zlatnik is on a distinguished road
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.
zlatnik is offline   Reply With Quote