vector member variable

I have a class which needs a large 2D matrix, preferably of dynamic size but compile time setting of the size is ok if necessary. I would like to use the vector class for access simplicity if at all possible. I have tried putting the following line in my class definition but to no avail:

vector<vector<double> > sfcMatrix(80, vector<double> (10000));

Which produces:

../src/rubberEngineClassTSA.h:100: error: expected identifier before numeric constant
../src/rubberEngineClassTSA.h:100: error: expected ‘,’ or ‘...’ before numeric constant

Any suggestions?

Thanks,
Jared
I take it this line is in the constructor for the class?

Do you have a "using namespace std;" or "using std::vector;" in the header file?

The above line cannot be declaring a member variable of the class.
(which I suspect is your problem).
Topic archived. No new replies allowed.