S
Steve
I'll be the first to admit, I'm not entirely clear on the appropriate
usage of either.
From what I am reading in my books, a Struct and a Class are pretty
much the same, with the difference being, a Class can have private and
protected members, but a Struct everything is Public by default.
I laymans terms what would be an appropriate reason to choose a Struct
over a Class?
So why would one want to choose a Class over a Struct.
According to ISO, what are the differences?
The following code is from an opensource game "cheater" program, but
it is what piqued my interest.
typedef struct _GUILDS {
PVOID pOneEntryVTable;
BYTE UnknownByte0x0005;
BYTE Unknown0x0005[0x3f];
DWORD UnknownValue0x0044;
DWORD UnknownValue0x0048;
CHAR GuildName[MAX_GUILDS][0x40];
BYTE UnknownByteArray0x804c[0x200];
BYTE UnknownByteArray0x824c[0x40];
} GUILDS, *PGUILDS;
Would there have been ANY advantage to making this a class?
Strangely enough, this Struct eventually becomes part of a class, that
has 5 other structs, what would the advantage be to creating 6
structs, and then placing them into a class, rather than using classes
to begin with or Structs to end with?
Well thanks in advance for you patience and help.
usage of either.
From what I am reading in my books, a Struct and a Class are pretty
much the same, with the difference being, a Class can have private and
protected members, but a Struct everything is Public by default.
I laymans terms what would be an appropriate reason to choose a Struct
over a Class?
So why would one want to choose a Class over a Struct.
According to ISO, what are the differences?
The following code is from an opensource game "cheater" program, but
it is what piqued my interest.
typedef struct _GUILDS {
PVOID pOneEntryVTable;
BYTE UnknownByte0x0005;
BYTE Unknown0x0005[0x3f];
DWORD UnknownValue0x0044;
DWORD UnknownValue0x0048;
CHAR GuildName[MAX_GUILDS][0x40];
BYTE UnknownByteArray0x804c[0x200];
BYTE UnknownByteArray0x824c[0x40];
} GUILDS, *PGUILDS;
Would there have been ANY advantage to making this a class?
Strangely enough, this Struct eventually becomes part of a class, that
has 5 other structs, what would the advantage be to creating 6
structs, and then placing them into a class, rather than using classes
to begin with or Structs to end with?
Well thanks in advance for you patience and help.