简体   繁体   English

如何在C ++中使用boost :: dynamic_bitset

[英]How to use boost::dynamic_bitset in C++

How would I go about using boost::dynamic_bitset ? 我将如何使用boost::dynamic_bitset

I've tried a simple include statement: #include <boost/dynamic_bitset.hpp> , 我尝试了一个简单的include语句: #include <boost/dynamic_bitset.hpp>
but in Dev C++ I get an error saying 但是在Dev C ++中我收到一条错误消息
"No such file or directory."
Do I need to download the necessary files and include them in the project? 我需要下载必要的文件并将其包含在项目中吗?
If so, which files? 如果是这样,哪些文件?

Thanks for any suggestions. 感谢您的任何建议。

That is because your compiler does not know where to find the boost libraries. 那是因为您的编译器不知道在哪里可以找到Boost库。 You need to download them, extract them, and then setup your build script/development environment to point to them. 您需要下载它们,解压缩它们,然后设置您的构建脚本/开发环境以指向它们。

If the compiler doesn't know where the Boost libraries are it wont be able to link your code to Boost. 如果编译器不知道Boost库在哪里,它将无法将您的代码链接到Boost。

Here is a getting started guide that details this. 这是一个详细的入门指南。

And here is the download link. 这是下载链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM