What's wrong?
code
vector<double>MatrixVector(vector<vector>double>A,
vector<double>b){
unsigned longm = A.size();
unsigned long n = A.front().size();
vector<vector<double>>d(m);
for(inti=0;i<m;i++){
for(int j=0;j<n;j++){
d[i][j] = 0;
for(intk=0;k<n;k++){
d[i][j]+=A[i][k]*b[j];
}
}
}
}
warning messages
control reach end of non-void function [-Wreturn-type]
c++ procession
As warned, the MatrixVector
function declares a return value of type vector<double>
but does not contain a return
statement.
© 2024 OneMinuteCode. All rights reserved.