摘要: 静态成员如果有n个同类的对象,那么每一个对象都分别有自己的数据成员,不同对象的数据成员各自有值,互不相干。但是有时人们希望有某一个或几个数据成员为所有对象所共有。这样可以实现数据共享。在前面介绍过全局变量能够实现数据共享。如果在一个程序文件中有多个函数,在每一个函数中都可以改变全局变量的值,全局变量... 阅读全文
posted @ 2015-03-04 17:44 伟gg 阅读(4493) 评论(0) 推荐(1) 编辑
摘要: 学习了虚基类,立马就会想到虚函数,虚基类有个虚基类表与之对应,才使其发挥了不一般的作用,当然虚函数也有一个不函数表,其原理如下所示:1.如果虚函数在基类与派生类中出现,仅仅是名字相同,而形式参数不同,或者是返回类型不同,那么即使加上了virtual关键字,也是不会进行滞后联编的。2.只有类的成员函数... 阅读全文
posted @ 2015-03-04 17:41 伟gg 阅读(231) 评论(0) 推荐(0) 编辑
摘要: D. Drazil and Tilestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDrazil created a following pr... 阅读全文
posted @ 2015-02-18 16:32 伟gg 阅读(199) 评论(0) 推荐(0) 编辑
摘要: C. Drazil and Factorialtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDrazil is playing a math ... 阅读全文
posted @ 2015-02-18 15:56 伟gg 阅读(315) 评论(0) 推荐(0) 编辑
摘要: B. Drazil and His Happy Friendstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDrazil has many f... 阅读全文
posted @ 2015-02-18 15:50 伟gg 阅读(188) 评论(0) 推荐(0) 编辑
摘要: A. Drazil and Datetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSomeday, Drazil wanted to go on... 阅读全文
posted @ 2015-02-18 15:45 伟gg 阅读(242) 评论(0) 推荐(0) 编辑
摘要: B. Han Solo and Lazer Guntime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere arenImperial storm... 阅读全文
posted @ 2015-02-15 17:01 伟gg 阅读(4864) 评论(0) 推荐(0) 编辑
摘要: C. Watto and Mechanismtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWatto, the owner of a spar... 阅读全文
posted @ 2015-02-15 16:51 伟gg 阅读(3400) 评论(0) 推荐(0) 编辑
摘要: B. Amr and Pinstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAmr loves Geometry. One day he cam... 阅读全文
posted @ 2015-02-13 15:24 伟gg 阅读(1545) 评论(0) 推荐(0) 编辑
摘要: C. Guess Your Way Out!time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAmr bought a new video game... 阅读全文
posted @ 2015-02-13 15:08 伟gg 阅读(1661) 评论(0) 推荐(0) 编辑