vector<int>vec1,vec2;

    int ival;

    cout<<"Ender numbers for vector1(-1 to end):"<<endl;

    cin>>ival;

    while (ival!=-1) {

        vec1.push_back(ival);

        cin>>ival;

    }

    cout<<"Ender numbers for vector2(-1 to end):"<<endl;

    cin>>ival;

    while (ival!=-1) {

        vec2.push_back(ival);

        cin>>ival;

    }

    if (vec1.size()!=vec2.size()) {

        cout<<"不相等"<<endl;

    }

    else{

        vector<int>::iterator ite1,ite2;

        for (ite1=vec1.begin(),ite2=vec2.begin(); ite1!=vec1.end(),ite2!=vec2.end(); ++ite1,++ite2) {

            if (*ite1==*ite2) {

                cout<<"相等"<<endl;

            }

        }

    }

  

最新文章

  1. [LeetCode] Populating Next Right Pointers in Each Node II 每个节点的右向指针之二
  2. iOS 引入framework的常见问题和原理
  3. 2.多线程-GCD
  4. hdu 3987 Harry Potter and the Forbidden Forest 求割边最少的最小割
  5. spring项目中如何添加定时器以及在定时器中自动生成sprng注入对象
  6. Xcode 6&#160;越狱开发基础
  7. 【Android】JSONArray的合并
  8. NGUI类之间的关系和架构
  9. BZOJ 1211: [HNOI2004]树的计数( 组合数学 )
  10. Sass与Compress实战:第五章
  11. 基于Three.js的360度全景--photo-sphere-viewer--简介
  12. android 获取Bitmap位图所占用的内存大小
  13. 14.5 富文本编辑【JavaScript高级程序设计第三版】
  14. BZOJ2333 [SCOI2011]棘手的操作 堆 左偏树 可并堆
  15. jsfl 将库中声音放置到时间轴上
  16. [Module] 03 - Software Design and Architecture
  17. Oracle EBS 键弹性域 段限定词取值
  18. Spring自动装配Bean详解
  19. OSX 下 sftp 上传目录到服务器
  20. 纯css实现点击事件

热门文章

  1. Nyoj 城市平乱(图论)
  2. 教你Ant安装和配置
  3. POJ 2109 :Power of Cryptography
  4. 通讯录C++console application
  5. 使用PHP生成PDF文档
  6. UITabBarControler解决旋转问题
  7. C# 程序自动批量生成 google maps 的KML文件
  8. javascritpt 原型链
  9. IE6下jquery ajax报error的原因
  10. 最新HTML BroadcastChannel API引荐