私はこの属性を持つ教授クラスを持っています
vector<int> hDisponibles;
このクラスのベクトルがある場合
set<profesor> profesores;
これを試してみます
set<profesor>::iterator itP;
itP = profesores.begin();
while ( itP != profesores.end() ){
(*itP).hDisponibles->push_back(0);
itP++;
}
しかし、このエラー
utils.cpp:138: error: passing ‘const std::vector<int, std::allocator<int> >’ as ‘this’ argument of ‘void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = int, _Alloc = std::allocator<int>]’ discards qualifiers