摘要:
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 阅读全文
摘要:
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,从字符串输 阅读全文