设为首页 加入收藏

TOP

关于c++ list容器的操作摸索
2015-07-24 06:00:45 来源: 作者: 【 】 浏览:9
Tags:关于 list 容器 操作 摸索
#include
  
   
#include
   
     #include
    
      #include
     
       #include
      
        using namespace std; struct n1 { string name; long long num; }; list
       
        l; void charu() { n1 tmp; cin>>tmp.name>>tmp.num; if(tmp.num
        
         >xs; l.remove_if(way); } void shanxuehao() { cin>>xi; l.remove_if(way); } void xianshi() { list
         
          ::iterator i; for(i=l.begin();i!=l.end();i++) cout<
          
           name<<","<
           
            num<
            
             >j; if(j==1) { cout<<"输入名字,学号(例如,杜甫 123):"<
             
              >j; if(j==1) shanmingzi(); else if(j==2) shanxuehao(); else if(j==3) quanshan(); } else if(j==3) { xianshi(); } else if(j==4) { cout<<"1.顺序 2.倒序"<
              
               >j; if(j==1) shunxu(); else if(j==2) daoxu(); cout<<"1.去重"<
               
                >j; if(j==1) l.unique(same_integral_part); } } int main() { int j; while(1) { xuanze(); cout<<"0.退出 1.返回选择界面"<
                
                 >j; if(j==0) return 0; system("cls"); } }
                
               
              
             
            
           
          
         
        
       
      
     
    
   
  

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇BZOJ 3562: [SHOI2014]神奇化合物.. 下一篇HDU 2510 符号三角形 NYOJ491 幸..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: