目前只会:string s还不能大写
string buf1 = "app";
string m_qrcode="app";
m_qrcode.compare(buf1) == 0
等于零说明相等
compare函数在>时返回1,<时返回-1,==时返回0
string buf1 = "app";
string m_qrcode="app";
m_qrcode.compare(buf1) == 0
等于零说明相等
compare函数在>时返回1,<时返回-1,==时返回0
本文介绍了字符串比较的方法,重点讲解了compare函数的使用。当两个字符串相等时,compare函数返回0;若第一个字符串大于第二个字符串,则返回1;反之返回-1。
1万+

被折叠的 条评论
为什么被折叠?



