上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 32 下一页
摘要: 1、class关键字的同义词 2、类型名指示符 告诉编译编译器把一个特殊的名字解释成一个类型。在下列情况下必须对一个name使用typename关键字: 一、一个唯一的name(可以作为类型理解),嵌套在另一个类型中 二、依赖于一个模板参数,就是说模板参数在某种程度上包含这个name,当模板参数是编 阅读全文
posted @ 2019-05-28 21:05 JohnRed 阅读(256) 评论(0) 推荐(0) 编辑
摘要: ``` //set(CPACK_GENERATOR "TGZ") 7Z(.7z) 7Zzip(.7z) TBZ2(tar.bz2) TGZ(.tar.gz) TXZ(.tar.xz) TZ(.tar.Z) ZIP(.zip) ``` ``` #vInstallCpack.cmake ###install install(FILES [FileName] DESTINATION [InstallF... 阅读全文
posted @ 2019-05-28 16:29 JohnRed 阅读(3009) 评论(0) 推荐(0) 编辑
摘要: ``` std::fstream fin("fine.name",std::fstream::in|std::fstream::ate); if(fin.good()) { size_t file_size=fin.tellg(); fin.seekg(0,std::fstream::beg); s 阅读全文
posted @ 2019-05-28 11:46 JohnRed 阅读(282) 评论(0) 推荐(0) 编辑
摘要: ``` 1、不支持数组 2、c++11支持make_shared,分配一次内存,构造函数为private和proteced时不能调用。 3、new初始化分配两次内存,一、分配数据块内存,二、分配控制块内存 ``` ``` ``` 阅读全文
posted @ 2019-05-28 11:26 JohnRed 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 用string 存储文件内容 用unique_ptr存储文件内容 阅读全文
posted @ 2019-05-28 11:05 JohnRed 阅读(681) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-05-28 10:27 JohnRed 阅读(140) 评论(0) 推荐(0) 编辑
摘要: wait_until(阻塞当前线程,直到条件变量被唤醒,或直到抵达指定时间点) include include include include include using namespace std::chrono_literals; std::condition_variable cv; std: 阅读全文
posted @ 2019-05-22 10:05 JohnRed 阅读(3563) 评论(0) 推荐(1) 编辑
摘要: ###wait_for(阻塞当前线程,直到条件变量被唤醒,或到指定时限时长后) #include <iostream> #include <string> #include <sstream> #include <thread> #include <mutex> #include <conditio 阅读全文
posted @ 2019-05-22 10:02 JohnRed 阅读(7679) 评论(0) 推荐(0) 编辑
摘要: wait(阻塞当前线程,直到条件变量被唤醒) include include include include include std::mutex m; std::condition_variable cv; std::string data; bool ready = false; bool pr 阅读全文
posted @ 2019-05-22 10:01 JohnRed 阅读(2991) 评论(0) 推荐(0) 编辑
摘要: run.sh 阅读全文
posted @ 2019-05-09 19:51 JohnRed 阅读(1209) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 32 下一页