原创 C++智能指針模板類複習
//C++智能指針模板類複習 #include<iostream> #include<memory> using namespace std; //
原创 模板元編程加速遞歸
//模板元編程加速遞歸 //缺點:模板元在編譯時處理,無法調試,並且會加大代碼體積 #include<iostream> using namespa
原创 優先隊列C++數組實現
//優先隊列 #include<iostream> using namespace std; class Queue { private:struc
原创 C++類轉換構造函數和轉換函數複習
//C++類轉換構造函數和轉換函數複習 #include<iostream> #include<string> using namespace st
原创 C++模板函數複習
#include <iostream> #include <typeinfo> using namespace std; template <class T> T add(T one, T two) { cout << "類型:
原创 C++ lambda表達式複習
#include<iostream> #include<array> #include<vector> #include<algorithm> us
原创 AVL樹C++實現
//AVL樹 #include<iostream> #include<functional> using namespace std; class avl_tree { private:struct tree{int data;tree*
原创 二叉樹中綴表達式到後綴表達式的轉換
規則: 當讀到一個操作數時,立即把它放到輸出中。當讀到操作符時不立即輸出,從而必須先存在某個地方。正確的做法是將已經見到過的操作符放進棧中而不是放到輸出中。當遇到左括號時我們也要將其推入棧中。如果遇到一個右括號,我們就彈出棧中的符號並輸出
原创 C++模板類複習
//C++模板類複習 #include<iostream> using namespace std; template <class T1, cla
原创 C++友元複習
#include<iostream> #include<string> using namespace std; class Student; cl
原创 C++引用複習
//引用複習 #include<iostream> using namespace std; void show1() { cout <<
原创 C++中類const、static、static const成員變量
#include<iostream> using namespace std; class Test { private:const int a; //const 成員變量只能在構造函數的成員初始化列表中初始化,不能在函數體中和其他地方
原创 可變參數模板用法
//可變參數模板 //可變參數模板,可以創建可接受可變數量參數的模板函數和模板類 //本程序通過模板函數來實例一下可變參數模板的基本用法 #incl
原创 C++實現C語言printf函數
//簡單實現C語言中printf函數 #include<iostream> #include<typeinfo> #include<string.h
原创 sql sever2008表連接複習總結
use master go if exists(select * from sysdatabases where name = '學生管理系統')