怎么样?
std::string str1, str2;
/* do stuff to str1 and str2 */
if (str1 == str2) { /* do something */ }
Run Code Online (Sandbox Code Playgroud)
要么
if (str1.compare(str2) == 0) { /* the strings are the same */ }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9525 次 |
| 最近记录: |