* * * * * * * * * * * *************************2013/11/12 * * * * * * * * * * * * * 例6-23 string类应用举例 * #include string #include iostream using namespace std; //根据value的值输出true或false,title为提示文字 inline void test(const char *title, bool value) { cout title returns (value ? true : false) endl; } 6.6 字符串 —— 6.6.2 string类 例6-23 (续) * int main() { string s1 = DEF; cout s1 is s1 endl; string s2; cout Please enter s2: ; cin s2; cout length of s2: s2.length() endl; //比较运算符的测试 test(s1 = \ABC\, s1 = ABC); test(\DEF\ = s1, DEF = s1); //连接运算符的测试 s2 += s1; cout s2 = s2 + s1:
您可能关注的文档
最近下载
- 中成药配方详解:橘红颗粒.ppt
- DL 5190.4-2019 电力建设施工技术规范 第4部分:热工仪表及控制装置.pdf VIP
- 2026年学习教育查摆问题清单及整改措施台账(四个方面16条).docx VIP
- Kager三角临床意义.pptx VIP
- 三毛流浪记6.pdf VIP
- 城市轨道交通车辆构造:城轨交通车辆空调系统PPT教学课件.pptx
- (2021-2025)五年高考物理真题分类汇编(全国)专题11 电磁感应(解析版).docx VIP
- 2026年建筑施工企业土建类专职安全员(建安C2证)考核题库.docx
- 政府机关餐饮服务食堂餐饮服务方案.docx VIP
- 生活垃圾处置及清运服务实施方案.docx VIP
原创力文档

文档评论(0)