1、直接用String 类定义 String bee="Temperature2";比较相等: int strcmp(const char* s1,const char* s2);所在头文件:string.h 即:两个字符串自左向右逐个字符相比(按ASCII值大小相比较),直到出现不同的字符或遇’\0’为止。如:“A”<”B”“a”>”A”“computer”>”compare” 特别注意:strcmp(const char s1,const char s2)这里面只能比较字符串,即可用于比较两个字符串常量,或比较数组和字符串常量,不能比较数字等其他形式的...