
Originally Posted by
zeco
Yeah i can be really confused/confusing sometimes, But i think i get it all now. By the way, what is the point of structs? Haven't classes basically superseded them? To my knowledge the only difference between a struct and a class, is the default access specifier (class is private, struct is public.)
Classes rule! Except in school.
Yeah they're a left-over from C.. used to be that structs didn't support member methods etc.. also they're value type vs reference type etc. I usually only use structs when defining objecs that are aggregates of other objects for instance:
struct MyStruct
{
string text;
int ID;
int Tag;
void* pData;
}
That way I know when I use that object later on there's no methods on it etc etc.. but again that's just personal preference. No rule against using just classes
