I have a class header file called Grid.h that contains the following 2 private data object:
vector column;
vector> row;
I think you want something like this... (although I cannot imagine why :-))
#include
#include
using namespace std;
typedef vector row;
typedef vector matrix;
matrix mat(2,2);
int getElement (unsigned int ri, unsigned int ci)
{
return mat[ri][ci] ;
}
int main() {
mat[1][0] = 1234;
cout << getElement(1,0) << endl;
return 0;
}