假设当std::string类型的字符串str是“abc”时,触发断点。
采用: str == "abc"的方式,在CLion下发现始终会暂停。
经过研究发现,正确的方式应该是:
(int) strcmp( str.c_str(), "abc") == 0