これは私が実行しているコードです:
std::vector<std::vector<double>> test;
test.push_back(std::vector<double>(30));
std::vector<std::vector<double> >::iterator it=test.begin(), end=test.end();
while (it!=end) {
std::vector<double>::iterator it1=it->first.begin(),end1=it->first.end();
while (it1!=end1) {
std::copy(it1.begin(),it1.end(),std::ostream_iterator<double>(std::cout, " "));
++it1;
}
++it;
}
これは私が得るコンパイルエラーです:
data.cpp:33:45: error: ‘class std::vector<double>’ has no member named ‘first’
data.cpp:33:68: error: ‘class std::vector<double>’ has no member named ‘first’
data.cpp:35:16: error: ‘class std::vector<double>::iterator’ has no member named ‘begin’
data.cpp:35:28: error: ‘class std::vector<double>::iterator’ has no member named ‘end’
data.cpp:35:34: error: ‘ostream_iterator’ is not a member of ‘std’
data.cpp:35:56: error: expected primary-expression before ‘double'
テストの内容を印刷できるように修正する方法に関する提案