摘要:
前言: #include <thread> thread.join() // 阻塞 thread.detach() // 非阻塞 thread.joinable() // bool,判断线程是否支持join或者detach 正文: 创建线程有三种方式,分别是:使用函数来创建线程、使用自定义的类来创建 阅读全文
摘要:
#include <iostream> #include <string> #include <sstream> int main() { // 方法一:123456 std::string a = "123"; std::string b = "456"; std::string c; c.app 阅读全文
摘要:
std::chrono::milliseconds stopTime(2000); std::this_thread::sleep_for(stopTime); 阅读全文