std::vector< std::vector<coords> >::iterator iter;
for(iter = characters.begin(); iter != characters.end(); iter++)
{
std::vector<coords>* cha = iter; // doesn't work.
}
// does work.
std::vector<coords>* character = &characters.at(0);
coords* first = &character->at(0);
そして、私には理由がわかりません。iter は、コンテナーが「含む」と想定されている型の要素へのポインターであると想定されていませんか?
これに光を当てたい人はいますか?
動作しないということは、次のことを意味します。
error C2440: 'initializing' : cannot convert from 'std::_Vector_iterator<_Ty,_Alloc>' to 'std::vector<_Ty> *'
これは私にはあまり意味がありません。