#include <stdio.h>
#include <string.h>
#define N 20
typedef struct {
int b; /*学生番号*/
int s; /*身長*/
char k[10]; /*結果*/
}Student;
int main (void){
FILE *fp;
char m[N];
fp = fopen("text.txt","r");
if(fp == NULL)
printf("オープンNG\n");
while(fgets(m,N,fp)!= NULL){
printf("%s",m);
}
fclose(fp);
}
これでは単に取り込んだだけ
構造体に入ってはいない。。。 もう少しもじらねばっ |

- >
- Yahoo!サービス
- >
- Yahoo!ブログ
- >
- 練習用




