摘要: 在单继承的情况下,父类构造先于子类,子类析构先于父类,例:class A {public: A() { cout << "A" << endl; } ~A() { cout << "~A" << endl; }};class B : public ... 阅读全文
posted @ 2015-03-21 21:30 厕所门口~~ 阅读(948) 评论(0) 推荐(0) 编辑
摘要: const 常量的在超出其作用域的时候会被释放,但是 static 静态变量在其作用域之外并没有释放,只是不能访问。static 修饰的是静态变量,静态函数。对于类来说,静态成员和静态函数是属于整个类的,而不是属于对象。可以通过类名来访问,但是其作用域限制于包含它的文件中。static 变量在类内部... 阅读全文
posted @ 2015-03-20 21:11 厕所门口~~ 阅读(18788) 评论(1) 推荐(6) 编辑
摘要: clog:控制输出,使其输出到一个缓冲区,这个缓冲区关联着定义在 的 stderr。cerr:强制输出刷新,没有缓冲区。cout:控制输出,使其输出到一个缓冲区,这个缓冲区关联着定义在 的 stdout。但是我们分别测试如下三个程序的结果如下:cout:#include using namesp... 阅读全文
posted @ 2015-03-19 10:53 厕所门口~~ 阅读(1318) 评论(1) 推荐(0) 编辑
摘要: Description在一个神秘的国度里,年轻的王子Paris与美丽的公主Helen在一起过着幸福的生活。他们都随身带有一块带磁性的阴阳魔法石,身居地狱的魔王Satan早就想得到这两块石头了,只要把它们熔化,Satan就能吸收其精华大增自己的魔力。于是有一天他趁二人不留意,把他们带到了自己的地牢,分... 阅读全文
posted @ 2014-12-15 16:21 厕所门口~~ 阅读(613) 评论(0) 推荐(1) 编辑
摘要: Commando WarInput: Standard InputOutput: Standard Output “Waiting for orders we held in the wood, word from the front never cameBy evening the sound ... 阅读全文
posted @ 2014-12-08 21:00 厕所门口~~ 阅读(329) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2sec Memory Limit:32MBDescriptionThe young and very promising cryptographer Odd Even has implemented the security module of a large syste... 阅读全文
posted @ 2014-11-30 12:24 厕所门口~~ 阅读(336) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe sequence of n ? 1 consecutive composite numbers (positive integers that are not prime and not equal to 1) lying between two successive ... 阅读全文
posted @ 2014-11-30 11:17 厕所门口~~ 阅读(419) 评论(0) 推荐(0) 编辑
摘要: DescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum... 阅读全文
posted @ 2014-11-30 10:43 厕所门口~~ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: DescriptionAmtel has announced that it will release a 128-bit computer chip by 2010, a 256-bit computer by 2020, and so on, continuing its strategy of... 阅读全文
posted @ 2014-11-30 10:13 厕所门口~~ 阅读(391) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 1sec Memory Limit:32MBDescriptionOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of... 阅读全文
posted @ 2014-11-18 10:41 厕所门口~~ 阅读(298) 评论(0) 推荐(0) 编辑