Hi,
I coded that loop and get me the attach error. What's wrong? (trace debug shows me the runtime-error on 'return 0' )
thanks.
int main (int argc, char** argv) {
......................
vector<Unit> u(lines);
cout << "Weight " << u[0]._weight << " " << u[1]._weight << " " << u[2]._weight << "\n";
for (int i=0; i < example.size(); i++) {
for (int j=0; j < example[i].size(); j++) {
if (j < example[i].size() -1) {
u[j]._input = example[i][j];
cout << u[j]._input << endl;
}
else
u[j]._target = example[i][j]; //without this nothing problem (?)
//u[j]._input = example[i][j]; //with this no problem!
}
printf("\n");
}
return 0;
}
int main (int argc, char** argv) {
......................
vector<Unit> u(lines);
cout << "Weight " << u[0]._weight << " " << u[1]._weight << " " << u[2]._weight << "\n";
for (int i=0; i < example.size(); i++) {
for (int j=0; j < example[i].size(); j++) {
if (j < example[i].size() -1) {
u[j]._input = example[i][j];
cout << u[j]._input << endl;
}
else
u[j]._target = example[i][j]; //without this nothing problem (?)
//u[j]._input = example[i][j]; //with this no problem!
}
printf("\n");
}
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks