I've read explanations but to no avail. Could any one offer some explanation of what the difference is and what the benefits are of typedef, struct and classes?
spoonlicker -20 Junior Poster
Recommended Answers
Jump to Poststruct and class are essentially the same thing, just with different default access. structs are public by default and classes are private.
typedef is a completely different beast, and I'm curious what kind of misunderstanding prompted you to lump them together. Perhaps this little trick from C to avoid …
Jump to PostOkay, not being lewd here
You might want to look up the definition of lewd.
that sounds pretty...um....pointless.
You didn't specify which of the two things you consider pointless. For the similarities between struct and class, that's an understandable opinion, but there are good historical reasons for doing things that …
Jump to PostI don't clearly get that
I understand, but you're not likely to get it without a bit more experience. This is just one of those features where one day you have an ah-ha! moment.
And as dumb as this sounds, what do you people mean by "types" and "portability?"
Type …
All 10 Replies
Narue 5,707 Bad Cop Team Colleague
Fbody 682 Posting Maven Featured Poster
spoonlicker -20 Junior Poster
Narue 5,707 Bad Cop Team Colleague
spoonlicker -20 Junior Poster
Fbody 682 Posting Maven Featured Poster
spoonlicker -20 Junior Poster
Narue 5,707 Bad Cop Team Colleague
spoonlicker -20 Junior Poster
Narue 5,707 Bad Cop Team Colleague
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.