在以前寫程式的時候

遇到陣列總是很頭痛

交換、刪除總是要寫很多的函式來處理

 

vector這個在C++裡面好用的功能真的很強大

介紹看這個網站:

http://www.cplusplus.com/reference/stl/vector/

 

有這幾種基本功能超方便的開懷大笑

Modifiers:

assign
Assign vector content (public member function)

push_back
Add element at the end (public member function)

pop_back
Delete last element (public member function)

insert
Insert elements (public member function)

erase
Erase elements (public member function)

swap
Swap content (public member function)

clear
Clear content (public member function)

創作者介紹
創作者 小D 的頭像
小D

小D狂想曲

小D 發表在 痞客邦 留言(0) 人氣()