What's the point of a struct? I mean, isn't it basically the same thing as a class? So what it's used for?
Jump to Post
Yeah, it is basically the same thing as a class. Keeping 'struct' in the language kept C++ a near-superset of C, since C contained structs. The real mystery to me is why they added 'class' in the first place. I guess it was to make the language seem more object-oriented.
All 8 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.