strcmp() 用来比较字符串(区分大小写),其原型为:
int strcmp(const char *s1, const char *s2);
【参数】s1, s2 为需要比较的两个字符串。
【返回值】若参数s1 和s2 字符串相同则返回0。s1 若大于s2 则返回大于0 的值。s1 若小于s2 则返回小于0 的值。
Reference:
http://c.biancheng.net/cpp/html/162.html
strcmp() 用来比较字符串(区分大小写),其原型为:
int strcmp(const char *s1, const char *s2);
【参数】s1, s2 为需要比较的两个字符串。
【返回值】若参数s1 和s2 字符串相同则返回0。s1 若大于s2 则返回大于0 的值。s1 若小于s2 则返回小于0 的值。
Reference:
http://c.biancheng.net/cpp/html/162.html
转载于:https://www.cnblogs.com/QingHuan/p/6559561.html