new
, delete
#include <string>
std::string myname = "sprout";
#include <iomanip>
#include <sstream>
std::stringstream ss;
ss << XXX;
ss >> OOO;
ss.clear();
int *a, *b;
void swap(int a, int b);
void swap(int *a, int *b);
void swap(int &a, int &b);
new
使用之後記得 delete
vector
:伸縮自如的陣列list
:雙向鏈結串列stack
:類似疊東西,優先取得最後的資料queue
:類似排隊,優先取得最早的資料insert
, erase
std::sort
排序#include <algorithm>
std::next_permutation
下個字典序#include <algorithm>