摘要: #include #include #include #include #include using namespace std; class LogFile { public: LogFile() { f.open("log.txt"); } ~LogFile() { } void shared_print(string... 阅读全文
posted @ 2019-09-17 11:31 BitsStitcher 阅读(3124) 评论(0) 推荐(0)
摘要: C++‘s Most Vexing Parse凡是长的像函数声明的,都是函数声明。 常常出现在类的构造中使用匿名对象的时候。 解决办法:将匿名对象使用括号扩起来,作为一个整体使用C++11的初始化语法 {} 启动线程 也可以传递lambda表达式来启动线程 启动线程后,需要明确是要等待线程结束(加入 阅读全文
posted @ 2019-09-17 11:18 BitsStitcher 阅读(1192) 评论(0) 推荐(0)
摘要: C++版本测试 #include <iostream> using namespace std; int main() { cout << __cplusplus << endl; system("pause"); return 0; } 常见的新增头文件 #include <type_traits 阅读全文
posted @ 2019-09-17 11:10 BitsStitcher 阅读(130) 评论(0) 推荐(0)