現在シミュレーターで作業しており、デバッグ実行時に次のエラーが発生しました。式:ベクター互換性のないイテレーター
コードは次のとおりです。
class Network {
private:
vector<Node*> nodes;
....
void parse_config(void);
....
};
そして、parse_configメソッドには、エラーを生成するシーケンスがあります。これだよ:
if(nodes.empty()) // add the first node to the network
{
Node current(regex_d[1]); // create current(first src) node
Node *acurrent = ¤t;
Node next_hop(regex_d[2]); // create the node we immediately send to
Node *anext_hop = &next_hop;
acurrent->add_next_hop(anext_hop);
acurrent->add_n_vchannels(regex_d[5]);
nodes.push_back(acurrent); // <== error
nodes.push_back(anext_hop); // <== here as well
}
これを回避する方法はありますか?ヘルプ/提案/参照は非常に高く評価されます。
セビ