我有一个具有此属性的教授课程
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