String类型字符串比较 2017-02-16 本文已影响0人 joy1314bubian strcmp可用于字符串比较但是要求两个参数都为const类型,所以可以用str.compare(" ")比较两个字符串