我正在尝试打印节点中的内容,但它显示以下错误
main.c: In function 'main':
main.c:83:37: error: request for member 'emails' in something not a structure or union
printf("%s\n", tmpNodesUnique[l].emails);
^
运行以下代码后出现上述错误。我在这里做错了什么?
Node *tmpNodesUnique[nodesCount];
int uniqueFound = 0;
tmpNodesUnique[0] = &tmpNodes[0];
for (k=1; k<10; k++){
if (strcmp(tmpNodesUnique[uniqueFound]->emails, tmpNodes[k].emails) != 0){
tmpNodesUnique[++uniqueFound] = &tmpNodes[k];
}
}
for (k=0; k<=uniqueFound; k++){
tmpNodesUnique[k]->emails;
}
for(l = 0; l <= nodesCount; l++){
printf("%s\n", tmpNodesUnique[l]->emails);
}