算法與數據結構之STL和基本數據結構————vector容器的使用

vector容器 vector是一個STL的動態數組,在運行時能根據須要改變數組的大小,以數組的形式存儲。 頭文件爲:ios #include <vector> 定義vector容器 定義示例 說明 vector < int > a; 默認初始化a爲空 vector < int > b(a); 用b定義a vector < int > a(100); 定義a數組中有100各爲0的元素 vector
相關文章
相關標籤/搜索