I am trying to implement the representation in the attached file.
class matriz {
private:
int fil,col;
int **filaspointer;
int *buffer;
public:
matriz();
matriz(int fil,int col);
};
matriz::matriz(int fil,int col) {
fil=fil;
col=col;
*filaspointer=new int[fil];
for (int i=0; i<fil; i++){
buffer=new int[col];
filaspointer=buffer;
}
}
int main () {
matriz test(2,3);
The program just closes when I execute it (i am 100 % sure its because the pointers are pointing the wrong direction :wall:)
But uh...I cannot see the problem here (maybe it lies down within the representation?).