摘要: 编写类String 的构造函数、析构函数和赋值函数,已知类String 的原型为:class String{public:String(const char *str = NULL); // 普通构造函... 阅读全文
posted @ 2015-03-13 12:44 cbam 阅读(113) 评论(0) 推荐(0) 编辑
摘要: //测试string的七个构造函数 string one("Lottery Winner"); cout<<one<<endl; string two(20,'$'); //20个元素的string对象,每... 阅读全文
posted @ 2015-03-13 12:33 cbam 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 在介绍完C#字符串处理方法之后,接下来介绍一下C++的字符串处理方法。C++的字符串处理方法没有C#的方便,它没有提供很多想C#那样实用的函数。在标准库中存在的string类型和传统的C字符串相比提供了较大的便利... 阅读全文
posted @ 2015-03-13 12:25 cbam 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 上述的四条语句,前面两个很好理解,而后面两个,大部分C++初学者都会比较困惑,今天我也是查阅了一些资料以后才恍然大悟。下面具体来说明一下:int i;int *a = &i;//这里a是一个指针,它指向变量i... 阅读全文
posted @ 2015-03-13 12:19 cbam 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. I... 阅读全文
posted @ 2015-03-12 17:11 cbam 阅读(58) 评论(0) 推荐(0) 编辑
摘要: u Calculate eTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm... 阅读全文
posted @ 2015-03-12 16:38 cbam 阅读(70) 评论(0) 推荐(0) 编辑
摘要: FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total S... 阅读全文
posted @ 2015-03-12 00:29 cbam 阅读(67) 评论(0) 推荐(0) 编辑
摘要: ElevatorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submissio... 阅读全文
posted @ 2015-03-11 17:27 cbam 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Let the Balloon RiseTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T... 阅读全文
posted @ 2015-03-11 13:03 cbam 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Number SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Su... 阅读全文
posted @ 2015-03-11 00:19 cbam 阅读(73) 评论(0) 推荐(0) 编辑