Say I have a class:
How could I declare a 3D array of the class and use the constructor?Code:class foo()
{
public:
foo(int n){
x=n;
}
private:
int x;
}
i.e., if I am successful and cout the value of fooInstance[0][0][0].x, it will show "n" as the output.