extern "C"用法
摘要:(1)C++调用C函数: //xx.h extern int add(...) //xx.c int add(){ } //xx.cpp extern "C" { #include "xx.h" } (2)C调用C++函数 //xx.h extern "C"{ int add(); } //xx.c
阅读全文
C++11多线程异步执行耗时程序
摘要:#include <iostream>#include <thread>#include <future>#include <vector>#include <mutex> std::mutex mtx; using namespace std;using namespace chrono; tem
阅读全文