MinGWで開発中の者です。
struct Info{
int num1;
int num2;
std::string str1;
};
int Delete(struct Info *pinfo,std::list<struct Info>& list){
for(std::list<struct Info>::iterator itr=list.begin();itr!=list.end();itr++){
if(pInfo==(*itr)){//ここで「no match for 'operator==' in 'pinfo == itr'」
//削除処理
}
}
}
int main(){
std::list<struct Info> list1;
struct Info info;
//要素追加処理。
struct Info del;
del={2,3,"foo"};
Delete(&del,list1);
return 0;
}
となってしまいます。
どのようにすれば良いのでしょうか。