缺少类模板的boost :: split_iterator参数

时间:2016-01-16 10:02:57

标签: c++ boost string-split

我看过几个展示如何使用split_iterator但是Visual Studio 2012向我显示此错误的示例: Error: argument for class template "boost::algorithm::split_iterator" is missing

这是我的代码:

...

#include "boost/algorithm/string/iter_find.hpp"
#include "boost/algorithm/string/finder.hpp"

...

const std::string sintactic_production_rule_representation[] =
{
    ...

    "P → B eol P",
    "P → F eol P",

    ...
}

...

for(int i = 0; i < N_PRODUCTIONS_SINTLL; i++)
{
    std::vector<std::string> splittedProduction;
    boost::split_iterator(
        splittedProduction, 
        sintactic_production_rule_representation[i], 
        boost::first_finder("&rarr;")
    );
}

我已使用boost bcp工具将iter_find.hppfinder.hpp以及依赖项提取到资源文件中。

我也尝试boost::split_iterator<std::string>(...)获取参数与错误匹配。

1 个答案:

答案 0 :(得分:0)

我正在尝试使用错误的提升功能。正如https://stackoverflow.com/a/15789561/3153012中的回答,我可以使用/**** Proj1 ****/ #include <filesFromProj2> int main() { while(ESC key not pressed) { // read data file // do some processing proj2.showResult(result) // how to do this ? } } 与一个或多个角色分开。

相关问题