Converting std::string from const_iterator to char*?

You should do

int error=regexec(&regex,cppstring.c_str(),nmatch,pmatch,eflags);

The second argument of regexec() and the return value of std::string::c_str() are both (const char *), so that’s probably not the cause of your issue.

You should post the compiler error message and the part of the code that you suspect to be causing the problem.

Browse More Popular Posts

Leave a Comment