2011年9月1日

摘要: a. string x; // 调用default constructorb. string x = 10; // 调用constructor parameterized by int,这条语句相当于string x(10);c. string x = "abc"; // 调用constructor parameterized by const char *,这条语句相当于string x("abc");d. x = "xyz"; // 调用assign operatore. string c = a + b; // 先调用add o 阅读全文
posted @ 2011-09-01 11:45 chihits 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 1. <stdio.h>scanfprintfputchar()getchar() = fgetc(stdin)gets(buf) = fgets(buf, MAXN, stdin)note that gets is deprecated in C2. <ctype.h>isalphaisdigitisprinttolowertoupper3. <string.h>strchr,在字符串中查找字符strcpy,字符串拷贝strcmp,字符串比较,0 return value indicates equalitystrcat,字符串连接sscanf,从字符串输 阅读全文
posted @ 2011-09-01 11:40 chihits 阅读(156) 评论(0) 推荐(0) 编辑

导航