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?
server_crash
64
Postaholic
Recommended Answers
Jump to PostYeah, 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
Rashakil Fol
978
Super Senior Demiposter
Team Colleague
Dave Sinkula
2,398
long time no c
Team Colleague
server_crash
64
Postaholic
Narue
5,707
Bad Cop
Team Colleague
server_crash
64
Postaholic
Stoned_coder
6
Junior Poster
Narue
5,707
Bad Cop
Team Colleague
server_crash
64
Postaholic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.