gpt4 book ai didi

c++ - knuth morris pratt + boost + circular_buffer

转载 作者:行者123 更新时间:2023-11-28 03:28:20 28 4
gpt4 key购买 nike

我发现 Boost 实现了 KMP 算法,我想将它与 circular_buffer 一起使用,但我无法将其与组件相匹配。任何有 boost 经验的人都可以告诉我如何做到这一点。

最佳答案

您遇到了什么样的问题?

#include <boost/circular_buffer.hpp>
#include <boost/algorithm/searching/knuth_morris_pratt.hpp>
#include <string>

int main (int, char **) {
boost::circular_buffer<char> cb;
std::string s;
boost::algorithm::knuth_morris_pratt_search ( cb.begin (), cb.end (), s.begin (), s.end ());
}

关于c++ - knuth morris pratt + boost + circular_buffer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13320602/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com