摘要:
实现一个类似QT、C#中的split()和C语言<string.h>中提供的strtok()函数的功能,目前该功能只能通过字符来分割字符串。(关于二级指针的释放,代码中可能存在有问题,还望大佬能够指正) #define _CRT_SECURE_NO_WARNINGS #include <iostre 阅读全文
posted @ 2021-12-23 14:08
久哥0522
阅读(66)
评论(0)
推荐(0)
摘要:
将字符串中含有的数字提取出来。 #include <iostream> #include <string> using namespace std; int ExtractNum(string ss, char* ch) { const char* c = ss.c_str(); int amoun 阅读全文
posted @ 2021-12-23 13:59
久哥0522
阅读(3742)
评论(0)
推荐(0)
摘要:
将整型数据拆分成单个数值。 #include <iostream> using namespace std; int numProcess(int num, int* num_pro) { int diget = 0; int num_befor = num; int num_after = num 阅读全文
posted @ 2021-12-23 13:55
久哥0522
阅读(1109)
评论(0)
推荐(0)

浙公网安备 33010602011771号