安装Boost
来源:互联网 发布:java与javascript区别 编辑:程序博客网 时间:2024/06/16 06:52
一, 安装Boost开发环境
到Boost官网下载boost_1_64_0.zip 这是官网的地址
下载过后安装Boost
在DOS在
可以发现解压后的文件中有一个bootstrap.bat文件。
运行bootstrap.bat
之后会新生成了一个bjam.exe文件
在命令窗口中输入语句:bjam.exe。
这是效果图
二,配置项目的环境
添加boostest工程的包含目录和库目录
包含目录添加 C:\Boost\boost_1_64_0
库目录添加 C:\Boost\boost_1_64_0\stage\lib
具体如下图
三,测试程序
#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>#include <boost/lexical_cast.hpp> #include <iostream>using namespace std;int main(void){ using boost::lexical_cast; int a = lexical_cast<int>("123"); double b = lexical_cast<double>("123.0123456789"); string s0 = lexical_cast<string>(a); string s1 = lexical_cast<string>(b); cout << "number: " << a << " " << b << endl; cout << "string: " << s0 << " " << s1 << endl; int c = 0; try { c = lexical_cast<int>("abcd"); } catch (boost::bad_lexical_cast& e) { cout << e.what() << endl; } printf("\n"); system("pause"); return 0;}
运行效果图
阅读全文
0 0
- 【BOOST学习】BOOST安装
- Boost 安装
- 安装Boost
- 安装Boost
- boost安装
- 安装boost
- Boost 安装
- 安装boost
- boost安装
- boost安装
- boost安装
- boost安装
- boost安装
- boost安装
- boost 安装
- boost安装
- Boost安装
- boost安装
- [内核源码][编译] 关于openssl/opensslv.h错误的解决方案
- windows10下使用Charles进行移动端抓包
- 1166 敌兵布阵(线段树求区间和)
- 面试问题你觉得你能胜任么
- 1698 Just a Hook(线段树段修改)
- 安装Boost
- Hibernate HQL查询
- 通达信公式破解
- 【Docker容器的跨主机访问】- 使用weave实现跨主机容器连接
- 汇编语言之80X86寄存器组相关知识
- design项目:3、代码创建数据库表
- 汇编语言之寻址方式
- jdbc
- mapper,reducer,OutputFormat