C++去除字符串符号问题
char *str = "青年杂志(上半年)"; int i, j; for (i = j = 0; str[i] != '\0'; i++) { if (!ispunct(str[i])) { str[j++] = str[i]; } } str[j] = '\0'; cout<<str<<end
char *str = "青年杂志(上半年)"; //字符串常量,不能修改它的值的,只是可读的空间//ispunct函数是判断非空格、非数字和非英文字母而已,还有其他的