Your compiler gives you an error because strcmp
is a C-style function that expects arguments of type const char*
and there is no implicit conversion from std::string
to const char*
.
And although you might retrieve a pointer of this type using std::string
's c_str()
method, since you are working with std::string
objects, you should use the operator ==
instead:
if (ligne == ligne_or) ...
or comparison with const char*
:
if (ligne == "[Syn****]") ...