jeudi 24 septembre 2020

How can I fix this error "no matching function for call to ‘regex_replace..` "?

Given the following code:

std::string str;
str= std::regex_replace(str, std::regex("\r"), ""); // ERROR

I get the following error:
no matching function for call to ‘regex_replace(std::string&, std::regex, const char [1])’

How can I fix this error?

Aucun commentaire:

Enregistrer un commentaire