Use class variables within the CPP class to create an array of objects?

Code:

class SparseMat;
class Trituple {
    friend class SparseMat;
private:
    int row, col;
    int data;
};

class SparseMat {
public:
    SparseMat(int MAXROW, int MAXCOL, int NonZeroterms) { Rows = MAXROW; Cols = MAXCOL; this->NonZeroterms = NonZeroterms; }
    SparseMat MAT_transpose(SparseMat b);
private:
    int Rows, Cols, NonZeroterms;
    Trituple SMArray[NonZeroterms];
};

2, problem
defines an array of objects of a ternary class in the SparseMat class, but vs2017 reports an error saying that my non-static member reference must be bound to the object. How should this be changed?

CPP
Mar.03,2021

class SparseMat {
public:
    SparseMat(int MAXROW, int MAXCOL, int NonZeroterms);
    SparseMat MAT_transpose(SparseMat b);
private:
    int Rows, Cols, NonZeroterms;
    Trituple* SMArray;
};

SparseMat::SparseMat(int MAXROW, int MAXCOL, int NonZeroterms)
    :Rows(MAXROW), Cols(MAXCOL), NonZeroterms(NonZeroterms)
{
     SMArray = new Trituple[NonZeroterms];
}
Menu