【求助】链表问题
怎样把文本文件中的信息存到链表中?谢谢啦!
程序代码:
#include <stdio.h> struct name { char id[4]; char name[10]; struct name *next; }; int main(void) { struct name _one = {0}; freopen("bbs.bat", "r", stdin); scanf("%s %s", _one.id, _one.name); printf("id:%s name:%s\n", _one.id, _one.name); return 0; }