c语言 strcmp的问题
来源:百度知道 编辑:UC知道 时间:2024/05/18 05:37:35
if(strcmp(temp_word, (AA+j)->word)==0)-----?
(AA+j)->word :watch窗口显示“A ”(我定义的(AA+j)->word 为char[10])
char temp_word[10]="";
strcpy(temp_word,"A");//watch 窗口显示temp_word:“A”
问题是,感觉没有错(strcmp的用法),为什么if语句过不了?也就是这两个字符串不相等??
strcmp(temp_word, (AA+j)->word)的值为-1
(AA+j)->word :watch窗口显示“A ”(我定义的(AA+j)->word 为char[10])
char temp_word[10]="";
strcpy(temp_word,"A");//watch 窗口显示temp_word:“A”
问题是,感觉没有错(strcmp的用法),为什么if语句过不了?也就是这两个字符串不相等??
strcmp(temp_word, (AA+j)->word)的值为-1
估计你的char[1]可能==0吧 '\0'的值就是0
手头没编译器。没法试试
返回是什么,看值来决定啊。
(AA+j)->word是不是0结尾的?
memset过吗?
C程序问题(strcmp 的怪现像)
strcmp的问题???
(c语言数组的!)比较两个字符串的大小。(不可以用strcmp做)
C语言编程-用数组方法编写函数strcmp,比较两个字符串的大小。
求教C++strcmp函数的用法???
C语言中strcmp是什么意思?有什么功能和作用?
c语言问题,高手帮下忙吧~?type mismatch in parameter 's1' in call to 'strcmp'
编C语言程序:用自定义函数实现字符串处理函数strcat、 strcpy、strcmp、strlen和strlwr的功能
C语言编程:用自定义函数实现字符串处理函数strcat、 strcpy、strcmp、strlen和
C语言的问题