// Test.cpp : 定義控制台應用程序的入口點。
//

#include "stdafx.h"
#include "iostream"
#include <vector>
#include <list>
#include <deque>
#include <string>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
 list<string> lis;
 lis.push_back("1");
 lis.push_back("2");
 lis.push_back("3");
 cout<<"大小:";
 cout<<lis.size();//獲取list集合大小
 cout<<endl;
 //遍曆數組
 list<string>::iterator iter = lis.begin();
 for(;iter!=lis.end();iter++){
  string s = *iter;
  std::cout<<s+"/n";
 }
 return 0;
}

 
arrow
arrow
    全站熱搜

    戮克 發表在 痞客邦 留言(0) 人氣()