摘要: 问题描述:n个人(编号从1到n),从1开始报数,报到m的退出,剩下的人继续从1开始报数。求胜利者的编号。 阅读全文
posted @ 2009-07-18 17:11 陆止于此 海始于斯 阅读(564) 评论(0) 推荐(0) 编辑
摘要: string类对象的构造 简化构造函数原型如下(注意,为了简便,把模板中最后一个默认参数省略了): 1: explicit basic_string(); 2: string(const char *s); 3: string(const char *s, size_type n); 4: string(const string& str); 5: string(const string& str, size_type pos, size_type n); 6: string(size_type n, E c); 7: string(const_iterator first, const_iterator last); 阅读全文
posted @ 2009-07-08 10:04 陆止于此 海始于斯 阅读(5743) 评论(0) 推荐(2) 编辑