You use new for dynamic allocation. It returns a pointer pointing to a dynamically allocated object.
You have no reason to use new , since A is an automatic variable. You can simply initialize A using your constructor:
vector<vector<int> > A(dimension, vector<int>(dimension));
Joseph Mansfield Feb 09 '14 at 18:47 2014-02-09 18:47
source share