阅读背景:

我可以用' = '来比较两个向量吗?我试过了,看来效果不错。但我不知道它能否在更复杂的情况下发挥作用。

来源:互联网 

First example:

第一个例子:

int main(){
    using namespace std;   
    vector<int> v1{10, 20, 30, 40, 50};
    vector<int> v2{10, 20, 30, 40, 50};

    if(v1==v2)
        cout<<"equal";
    else
        cout<<"unequal";
}   // it returns equal 
int main(){
    using



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: