我试图将AnsiString(someStr).c_str()传递给boost::split()第二个参数,但它否认显示参数不匹配!
下面是代码片段
vector<std::string> sVec;
boost::split(sVec,AnsiString(response).c_str(),boost::is_any_of(" "));//err in this line
ShowMessage(sVec[1].c_str());
然而,
促进::拆分(sVec,“这是一个测试”,boost::is_any_of(“"));
效果很好!
我是否正
假设我想匹配以下以竖线分隔的字符串:
std::string re("a|*|c");
std::string x("a|b|c");
std::string y("a|c|d");
does_match( re, x ); // want to return TRUE
does_match( re, y ); // want to return FALSE
使用boost::regex实现does_match()的最佳方式是什么?
我想我可能遇到了逃逸管道和星星的问题。请注意,我并不关心实际的匹配项:我只想要一个易于使用的does_mat
在Eclipse中编译C++项目时,我遇到了一些问题。它工作得很好,但是当我包含一个boost头文件(算法/string.hpp. but )时,它会向我显示以下错误:
16:25:53 **** Incremental Build of configuration Debug for project Emulator ****
make all
Building file: ../src/Emulator.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/lib/qt/include -I/root/boost/boost/ -O0 -g3 -Wall -