2015年6月3日

面向过程与面向对象的编程模式

摘要: C管理进程: 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 6 //面向过程的模式 7 //代码重用主要靠函数 8 //权限, 9 10 void open(const char *path,const... 阅读全文

posted @ 2015-06-03 15:30 Dragon-wuxl 阅读(285) 评论(0) 推荐(0)

Cpp union

摘要: 1 /* Cpp union */ 2 3 #include 4 5 // union 本质是一个类 可以内部有函数 6 // union 内部数据是共享的,不同对象之间是独立的 代码是共享的 7 // union 具备结构体所有的功能 8 // union 某些节约内存类 需要用到共用体 ... 阅读全文

posted @ 2015-06-03 10:12 Dragon-wuxl 阅读(219) 评论(0) 推荐(0)

递归汉诺塔

摘要: 1 /* 递归汉诺塔 */ 2 3 #include 4 5 void han(int n,char A,char B,char C) 6 { 7 static int num = 1; 8 std::cout " >n;27 std::cout << "n = " <... 阅读全文

posted @ 2015-06-03 09:14 Dragon-wuxl 阅读(111) 评论(0) 推荐(0)

导航