User:Feixie/C++/UsefulFuncsAndLibs

STL

 * copy(It1, It2, Ot1)
 * transform(It1, It2, Ot1, UnaryFunc)
 * set_union(It1, It2, It3, It4, Ot1)
 * sort(It1, It2, cmp)
 * insert_iterator(container, it)

Funcs
assert("a" == "a");
 * 1) include 

srand(time(0)); int r = rand % 100; // generate 0-99
 * 1) include 
 * 2) include 

Template
class DQueueFullException:exception { public: const char* what{return "DQueueFullException";} }; template class DQueue { public: DQueue; private: T _vec[MAX_SIZE]; }; template DQueue::DQueue{ // don't forget the  left = 0; right = 0; } try{ dq.pop_right; }catch(DQueueEmptyException& e){ // use ref cout << "Expected exception:" << e.what << endl; } catch(exception& e){ assert(false); }