阅读背景:

使用Boost的regex_match编译C ++代码

来源:互联网 

Given this code:

鉴于此代码:

#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
#include <boost/regex.hpp>
using namespace std;
using namespace boost;


int main  ( int arg_count, char *arg_vec[] ) {
    if (arg_count !=2 ) {
        cerr << "expected one argument" << endl;
        return EXIT_FAILURE;
    }

    string InputString = arg_vec[1];
    string toMatch = "FOO";

    const regex e(toMatch);
    if (const regex_match(InputString, e)) {// this is line 26
        cout << "Match" << endl;
    } else {
        cout << "No Match" << endl;
    }


    return 0;
}
#include <iostream



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: