C++ STL 容器基本範例實驗測試[07_CPP_STL_Algorithm ->純C++ Vector排序、反轉、搜尋範例]
資料來源:https://www.cnblogs.com/skyfsm/p/6934246.html
http://larry850806.github.io/2016/06/06/STL1/
http://larry850806.github.io/2016/06/06/STL2/
GITHUB 完整資料: https://github.com/jash-git/Base_CPP_STL_Example [ 包含免安裝開發環境:CodeBlocks 12.11 方便自己測試使用 ]
線上執行:https://www.tutorialspoint.com/compile_cpp_online.php / http://codepad.org/
Algorithm
sort:排序
reverse:反轉
find:搜尋
本範例額外紀錄
▲ 陣列 轉存 vector
#include
#include
#include /* malloc, free, rand */
#include /*strncpy .....*/
#include /*c++ string class*/
#include
#include
#include
#include
#include