Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <malloc.h>
- struct t1 {
- int Name;
- int coord_x;
- int coord_y;
- };
- int main()
- {
- FILE *file;
- file = fopen ("tesx1.txt","r");
- //FILE *vivod1;
- // vivod1 = fopen ("vivod.txt", "w");
- struct t1 *dano;
- dano = (struct t1 *)malloc(sizeof(struct t1)*100);
- int i=1;
- while (fscanf (file, "%d; %d;%d\n", &dano[i].Name, &dano[i].coord_x, &dano[i].coord_y)==3)
- {
- i++;
- if (i>9) break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement