就令一个字符串,往里输入字符;设置个结构体,有名字,身高,体重。怎么让字符串的字符一一对应这三个,最后输出来.求大神讲讲思路。
#include #include #include #define SIZE 100 //宏定义SIZE struct student { char name[SIZE]; char sex[10]; char age[10]; }stu; int fread_line_txt(FILE *fp, char *buf) // 读取文件中的一行 { int i = 0; while ((buf[i] = fgetc(fp)) !...