In the context of C++ (not that it matters):
class Foo{
private:
int x[100];
public:
Foo();
}
What I\'ve learnt tel
Given a slight modification of your example:
class Foo{
private:
int x[100];
int *y;
public:
Foo()
{
y = new int[100];
}
~Foo()
{
delete[] y;
}
}
Example 1:
Foo *bar = new Foo();
Example 2:
Foo bar;
Actual sizes may differ slightly due to class/struct alignment depending on your compiler and platform.