what is [b]???? Maybe its me but I don't get your post. if you want to set something like int q[7][10] through a constructor, pass it 2 integers and make those your indices. Some code would have helped wonders.
Code:
class IntArray
{
public:
IntArray(int a, int b);
~IntArray();
private:
int* array;
int rows;
};
IntArray::IntArray(int a, int b)
{
array = new int[a][b];
rows = a;
}
IntArray::~IntArray()
{
for( int i=0; i<rows; i++ )
{
if( array[i] )
{
delete [] array[i];
array[i] = 0;
}
}
delete [] array;
} // always cleanup :)