09 2021 档案

摘要:1、用strtok函数进行字符串分割 原型: char *strtok(char *str, const char *delim); 功能:分解字符串为一组字符串。 参数说明:str为要分解的字符串,delim为分隔符字符串。 返回值:从str开头开始的一个个被分割的串。当没有被分割的串时则返回NU 阅读全文
posted @ 2021-09-05 20:22 Yavn 阅读(735) 评论(0) 推荐(0)
摘要:#include<iostream> #include<string> using namespace std; int main() { string str; str = "123456"; cout << str << endl; //方法一:使用substr() str = str.subs 阅读全文
posted @ 2021-09-05 20:13 Yavn 阅读(5085) 评论(0) 推荐(0)