随笔分类 - Boost学习相关
摘要:1 #include <iostream> 2 #include <vector> 3 #include <boost/algorithm/string.hpp> 4 5 int main(const int argc, const char* argv[]) 6 { 7 std::vector<s
阅读全文
摘要:编译与安装Boost_1.69.0 到Boost官网下载 boost_1_69_0.zip 下载Boost_1.69.0 把下载的 boost_1_69_0.zip 解压到 E:\source\boost_1_69_0 下; 编译Boost_1.69.0 执行其下的脚本文件bootstrap.bat
阅读全文
摘要:自己使用的命令 原理 生成文件命名规则:boost中有许多库,有的库需要编译、而有的库不需要编译,只需包含头文件就可以使用。编译生成的文件名字普遍较长,同一个库根据编译链接选项不同,又可以生成多个不同名字的文件。生成的文件名字是很长,可是这样带的信息才多,也就容易识别出用途。其实生成文件的名字遵循一
阅读全文
摘要:应用场景: 在后端服务器项目开发中,需要初始化一个Socket服务器,需要IP地址与对应端口号等参数;另外还可能因为对接数据库,就还需要数据库的相关配置参数,如我使用的是MySql数据库,就需要数据库服务器的IP地址、端口号、用户名与密码,还有数据库的名称。如若这些配置信息直接写到代码里,就会给后期
阅读全文
摘要:源码: #include <boost/program_options.hpp> namespace po = boost::program_options; int main(int argc, char** argv) { int compression = -1; po::options_de
阅读全文
摘要:#include #include #include #include using namespace boost; using namespace boost::posix_time; void thread_func(); int main(int argc, char** argv) { std::cout << "start at main" << std::endl; ...
阅读全文

浙公网安备 33010602011771号