B
Brett Irving
Hi once again, another question,
I want to make a class object MyArray a global but have no idea about
how to go about initialising it within the constructor as it wont let
me do something like,
private:
int size;
MyArray MyArr(size);
I think I need to call the class constructor something to the effect
of
yourArray(int s, int num): MyArr(s)
{
............
}
My code is similar to this
class MyArray
{
............
MyArray(int size);
}
class yourArray
{
private:
MyArray(int);
public:
..
..
..
..
..
}
please help.
I want to make a class object MyArray a global but have no idea about
how to go about initialising it within the constructor as it wont let
me do something like,
private:
int size;
MyArray MyArr(size);
I think I need to call the class constructor something to the effect
of
yourArray(int s, int num): MyArr(s)
{
............
}
My code is similar to this
class MyArray
{
............
MyArray(int size);
}
class yourArray
{
private:
MyArray(int);
public:
..
..
..
..
..
}
please help.