Mac上安装boost, Xcode中使用
参考了https://www.cnblogs.com/kolane/p/12057744.html
使用终端安装
用Xcode新建C++项目
需要配置一下boost的路径

完了就能正常使用:
#include <iostream>
#include <boost/lambda/lambda.hpp>
#include <boost/timer.hpp>
int fun(int n){
if (n<=1) {
return n;
}
return fun(n-1)+fun(n-2);
}
int main(int argc, const char * argv[]) {
// insert code here...
std::cout << "Hello, World!\n";
fun(40);
boost::timer tm;
std::cout << tm.elapsed() << std::endl;
return 0;
}
此文仅为鄙人学习笔记之用,朋友你来了,如有不明白或者建议又或者想给我指点一二,请私信我。liuw_flexi@163.com/QQ群:582039935.
我的gitHub: (学习代码都在gitHub)
https://github.com/nwgdegitHub/

浙公网安备 33010602011771号