if(s.name=="kolkata") { printf("the details"); } if(strcmp((s.name,"kolkata")==0) { printf("the details"); }
第一个"if"情况没有语法错误仍然无法正常工作,而第二个"if"情况确实非常有效,为什么?
c string strcmp equality-operator
c ×1
equality-operator ×1
strcmp ×1
string ×1