
c++11
恋上豆沙包
这个作者很懒,什么都没留下…
展开
-
clion 拷贝可执行程序到本目录
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND cp ${PROJECT_BINARY_DIR}/${PROJECT_NAME} ${PROJECT_SOURCE_DIR} COMMAND echo "cp ${PROJECT_BINARY_DIR}/${PROJECT_NAME} ${P原创 2016-11-10 15:29:49 · 1865 阅读 · 0 评论 -
C++ MOVE
#include #include #include #include using namespace std;int main(){ std::string str = "Hello"; std::vectorstd::string> v; // uses the push_back(const T&) overload, which means转载 2016-11-10 15:27:41 · 587 阅读 · 0 评论 -
C++11 多线程并发1
#include <iostream>#include <stdio.h>#include <thread>using namespace std;void thread_task(){ cout<<" hello thread" <<endl;}int main(){ thread T(threa...原创 2016-11-10 19:34:59 · 296 阅读 · 0 评论 -
c++11多线程并发2
#include #include #include #include #include #include void f1(int n){ for (int i = 0; i 5; ++i) { std::cout \n"; std::this_thread::sleep_for(std::chrono::milliseconds(10));转载 2016-11-10 19:56:47 · 299 阅读 · 0 评论 -
c++11多线程并发3
#include // std::cout#include // std::thread#include // std::mutextypedef std::mutex stdmutex;typedef std::recursive_mutex std_recursive_mutex;typedef std::timed_mute转载 2016-11-10 20:19:30 · 432 阅读 · 0 评论 -
转 C++ 11 Lambda表达式
C++ 11中的Lambda表达式⽤用于定义并创建匿名的函数对象,以简化编程⼯工作。Lambda的语法形式如下:[函数对象参数] (操作符重载函数参数) mutable或exception声明->返回值类型{函数体}可以看到,Lambda主要分为五个部分:[函数对象参数]、(操作符重载函数参数)、mutable或exception声明、->返回值类型、{函数体}。下⾯面分别进⾏行介转载 2016-10-12 11:15:07 · 426 阅读 · 0 评论