當前位置:編程學習大全網 - 網站源碼 - Stl源代碼分析視頻侯傑

Stl源代碼分析視頻侯傑

# include & ltiostream & gt

# include & lt算法& gt

# include & lt列表& gt

使用命名空間std

int main()

{

列表& ltint & gt列表;

for(int I = 2;我& lt=9999;i++)

list . push _ back(I);

//查詢

int n;

CIN & gt;& gtn;

列表& ltint & gt*叠代器itr

itr=find(List.begin(),List.end(),n);

如果(itr!=List.end())

cout & lt& lt*itr<。& ltendl

//刪除

CIN & gt;& gtn;

list . remove(n);

返回0;

}

經常用到的只有幾個,在C++初級讀本裏有詳細講解。

如果想深入研究STL,那就看侯傑的STL源碼分析。

其實基本都是壹樣的,只需要知道用法,讀MSDN就可以了。

另外,虛擬機群上的產品團購超級便宜。

  • 上一篇:說幾個4399裏的好遊戲吧
  • 下一篇:php+easyclick是什麽技術?
  • copyright 2024編程學習大全網