Commit d84c90a9 by trkall

teine prax, parandus

parent 8461d296
No preview for this file type
#include <stdio.h>
#include <string.h>
//#include <stdlib.h>
//Andmefaili lugemis yl
char *CHKCODE = "01";
......@@ -21,7 +20,6 @@ int t66tlus(Inimesed *Isik, Inimesed *Uus);
int main(void)
{
printf("TEST");
Inimesed *Isik;
Inimesed *Uus;
FILE *andmed;
......@@ -30,7 +28,7 @@ int main(void)
if (chkFile(andmed) == 0)
{
printf("ERROR");
printf("Faili ei leitud!");
return 0;
}
......@@ -54,10 +52,8 @@ int chkFile(FILE *andmed)
void sisse(FILE *andmed, Inimesed *Isik)
{
int i = 0;
//Isik = (Inimesed*)malloc(sizeof(Inimesed));
while(!feof(andmed))
{
//Isik = (Inimesed*)realloc(Isik, 500);
fscanf(andmed, "%s %lf %s\n\n", (Isik+i)->nimi, &(Isik+i)->money, (Isik+i)->code);/// VIGA
i++;
}
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment