By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,227 Members | 1,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,227 IT Pros & Developers. It's quick & easy.

Error Initializing matrix

P: 2
Hi

I created a matrix using:

typedef vector<vector<double> > Matrix;

and then I define

Matrix V[10000][100];

However, when I assign the starting value

V[0][0]= vZero;

It said "error: no match for operator=" in V[0][0], am I missing something?
Mar 10 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,510
I think your definition
Expand|Select|Wrap|Line Numbers
  1. Matrix V[10000][100];
  2.  
creates an array of Matrix

should you define V so?
Expand|Select|Wrap|Line Numbers
  1.   vector < vector < double > > V(10000, vector <double>(100,0));
  2.    V[0][0]=0;
  3.  
Mar 10 '07 #2

P: 2
Thank you so much.
Mar 10 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.