strcmpで文字列を比較するときに、文字列側には、""を使わないといけない。''だとエラーになる。
std::string str = "a"; strcmp(str, 'a'); // エラー
std::string str = "a"; strcmp(str, "a"); // OK
strcmpで文字列を比較するときに、文字列側には、""を使わないといけない。''だとエラーになる。
std::string str = "a"; strcmp(str, 'a'); // エラー
std::string str = "a"; strcmp(str, "a"); // OK