Created
January 23, 2018 09:38
-
-
Save mattn/3b914a3429e426ee71012df9f4324442 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void meibo(int *a, char *filename){ | |
FILE *fp; | |
char keep[100]; | |
int i, count; | |
char *b; | |
if((fp=fopen(filename,"r"))==NULL){ | |
printf("File%s doesnt exist \n",filename); | |
exit(1); | |
} | |
if(fgets(keep,10,fp) == NULL){ | |
puts("Could not get count of records"); | |
exit(1); | |
} | |
count = atoi(keep); | |
for(i = 0; i < count; i++){ | |
fgets(keep,100,fp); | |
/* ここで1行(keep)を分割して構造体に格納していく処理を書く */ | |
} | |
/* make_student(keep); */ | |
fclose(fp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment