A
Allan Bruce
Whilst reading Accelarated C++, I found out that structs in C++ are almost
identical to classes. i.e.
struct Foo
{
public:
Get();
private
int mNum;
};
is the same as:
class Foo
{
public:
Get();
private
int mNum;
};
Apparantly the difference between structs and classes is that a class has
default private access, and a struct has default public access! Well, I
never!
Are there any other differences?
Thanks
Allan
identical to classes. i.e.
struct Foo
{
public:
Get();
private
int mNum;
};
is the same as:
class Foo
{
public:
Get();
private
int mNum;
};
Apparantly the difference between structs and classes is that a class has
default private access, and a struct has default public access! Well, I
never!
Are there any other differences?
Thanks
Allan