摘要:
// 替换字符串的某一字符 std::string& replace_all(std::string& str, const std::string& old_value, const std::string& new_value) { while (true) { std::string::siz 阅读全文
posted @ 2021-08-26 15:45
缘随风烬
阅读(1247)
评论(0)
推荐(0)
摘要:
// 清空字符串所有空格 std::string& ClearAllSpace(std::string &str) { int index = 0; if (!str.empty()) { while ((index = str.find(' ', index)) != std::string::n 阅读全文
posted @ 2021-08-26 15:42
缘随风烬
阅读(1401)
评论(0)
推荐(0)
摘要:
std::vector<std::string> split(std::string str, std::string pattern) { std::string::size_type pos; std::vector<std::string> result; str += pattern;//扩 阅读全文
posted @ 2021-08-26 15:40
缘随风烬
阅读(172)
评论(0)
推荐(0)
摘要:
class UDP { public: UDP() { RecvAddrSize = sizeof(RecvAddr); int nResult = WSAStartup(MAKEWORD(2, 2), &wsaData); if (nResult != NO_ERROR) { std::cout 阅读全文
posted @ 2021-08-26 15:39
缘随风烬
阅读(3131)
评论(0)
推荐(0)
摘要:
1、建立一个新的类,且需要继承QObject和QRunnable Class MyThreadPool : public QObject, public QRunnable{ }; 注意在继承的时候,一定是QObject在前,QRunnable在后,不然会报错。 2、声明各个函数。 class My 阅读全文
posted @ 2021-08-26 14:53
缘随风烬
阅读(362)
评论(0)
推荐(0)
浙公网安备 33010602011771号