Error while doing set_difference: Variable result is not a structure

前端 未结 2 428
离开以前
离开以前 2021-01-29 07:57

i had declared a set variable outside a function globally.

std::set s1;
std::set s2;   
std::set interse         


        
2条回答
  •  遇见更好的自我
    2021-01-29 08:46

    This code compiles for me.

    Perhaps your compiler is complaining about your underscore usage? Since it says:

    Variable result is not a structure.

    Whereas you declared _result_.

    See What are the rules about using an underscore in a C++ identifier? (as recommended by Mat).

提交回复
热议问题