上一页 1 2 3 4 5 6 ··· 16 下一页

2015年6月16日

内存异常处理

摘要: 1 /* 内存错误异常处理*/ 2 3 #include 4 #include 5 6 using namespace std; 7 8 struct MyStruct 9 {10 double px[1024*1024*128];11 };12 13 void main()14 {... 阅读全文

posted @ 2015-06-16 14:57 Dragon-wuxl 阅读(169) 评论(0) 推荐(0)

模板类与异常

摘要: 1 /* 模板处理异常*/ 2 3 #include 4 5 using namespace std; 6 7 template 8 class myarray 9 {10 public:11 myarray(int num)12 {13 if(num ();... 阅读全文

posted @ 2015-06-16 14:38 Dragon-wuxl 阅读(140) 评论(0) 推荐(0)

多态继承虚函数与异常

摘要: 1 /* 异常的继承与虚函数 */ 2 3 #include 4 5 using namespace std; 6 7 class print3dbox 8 { 9 public: 10 print3dbox(int num) 11 { 12 ... 阅读全文

posted @ 2015-06-16 14:21 Dragon-wuxl 阅读(99) 评论(0) 推荐(0)

类嵌套处理异常

摘要: 1 /* 类嵌套处理异常 */ 2 3 #include 4 #include 5 6 using namespace std; 7 8 9 class print3dbox 10 { 11 public: 12 print3dbox(int a,int b,in... 阅读全文

posted @ 2015-06-16 11:20 Dragon-wuxl 阅读(244) 评论(0) 推荐(1)

类中处理异常

摘要: 1 /* 数组类的异常 */ 2 3 #include 4 #include 5 6 using namespace std; 7 8 class memerror 9 {10 };11 12 class powererror13 {14 };15 16 class myArray17 {1... 阅读全文

posted @ 2015-06-16 10:38 Dragon-wuxl 阅读(88) 评论(0) 推荐(0)

.最简单的异常CPP实现

摘要: 1 /* 纯CPP异常 */ 2 3 #include 4 #include 5 6 using namespace std; 7 8 // try 存放有可能触发异常的程序 9 // throw 抛出异常 终止当前代码块继续执行 避免程序崩溃 throw可以抛出任何类... 阅读全文

posted @ 2015-06-16 09:39 Dragon-wuxl 阅读(196) 评论(0) 推荐(0)

2015年6月14日

hash_set与hash_map

摘要: 1 // hash_set 2 3 #include 4 #include 5 6 using namespace std; 7 8 void main() 9 { 10 hash_set myset;// 不会排序 存入哈希表 11 myset.inse... 阅读全文

posted @ 2015-06-14 18:04 Dragon-wuxl 阅读(142) 评论(0) 推荐(0)

map红黑树映射节点为节点或链表

摘要: 1 // map 2 3 #include 4 #include 5 6 using namespace std; 7 8 void main() 9 { 10 map mymap; 11 mymap["师长"] = 8; 12 mymap["旅长"... 阅读全文

posted @ 2015-06-14 17:39 Dragon-wuxl 阅读(269) 评论(0) 推荐(0)

set红黑树集合节点为节点或者链表

摘要: 1 // set 2 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void main() 10 { 11 set myset = {1,2,10,4,6}; 12 13 mys... 阅读全文

posted @ 2015-06-14 16:57 Dragon-wuxl 阅读(283) 评论(0) 推荐(0)

二进制bitset

摘要: 1 // bitset 2 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void main()10 {11 bitset mybit(255);// 主要用于位操作12 13 for(int i=... 阅读全文

posted @ 2015-06-14 15:43 Dragon-wuxl 阅读(132) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 16 下一页

导航