当我比较两个节点内的数据时,它表示它们不相等,但它们打印的是相同的信息。相同的数据但两个节点内部不相等
while(currentUserTry != NULL && currentPassword != NULL) {
if(currentUserTry->color != currentPassword->color){
printf("user %s - %lu\n", currentUserTry->color, strlen(currentUserTry->color));
printf("pass %s - %lu\n", currentPassword->color, strlen(currentPassword->color));
}
currentUserTry = currentUserTry->next;
currentPassword = currentPassword->next;
}
打印:
用户AZ - 2
通AZ - 含
用户虚拟机 - 2
通VM - 2
顺便说一下,让我们知道是否提出的答案工作通过勾选接受,答案。如果什么都行不通,请在下面的回答中评论什么不起作用以及应该改变什么。 – nikaltipar