Hello,
I think my problem is a simple one (but probably isn't) and something that I have foolishy overlooked. I have created a class (Time) with a constructor that has as its argument a 3x3 int array. It is defined in a header file as follows:
public:
Time(int [][columns]); //constructor
private:
int array[rows][columns];
In my program, the constructor is used to initialize the array to all 0's:
Time::Time(int array[][columns]) //time constructor
{
for (int i=0; i<rows; i++)
{
for (int j=0; j<columns; j++)
array[i][j] = 0;
}
}
Finally, under main() I attempt to instantiate object t of class Time and then use that object to call member functions (t.doMath(array), etc...)
Time t(array)
It is here that I run into problems. I get the following error:
`array' undeclared (first use this function)
Any help would be greatly appreciated.