Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
trkall
/
iag0582
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d84c90a9
authored
Feb 08, 2017
by
trkall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teine prax, parandus
parent
8461d296
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
5 deletions
praktikum 2.2/huihihih
praktikum 2.2/huihihih.c
praktikum 2.2/huihihih.o
praktikum 2.2/huihihih
View file @
d84c90a9
No preview for this file type
praktikum 2.2/huihihih.c
View file @
d84c90a9
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
//#include <stdlib.h>
//Andmefaili lugemis yl
//Andmefaili lugemis yl
char
*
CHKCODE
=
"01"
;
char
*
CHKCODE
=
"01"
;
...
@@ -21,7 +20,6 @@ int t66tlus(Inimesed *Isik, Inimesed *Uus);
...
@@ -21,7 +20,6 @@ int t66tlus(Inimesed *Isik, Inimesed *Uus);
int
main
(
void
)
int
main
(
void
)
{
{
printf
(
"TEST"
);
Inimesed
*
Isik
;
Inimesed
*
Isik
;
Inimesed
*
Uus
;
Inimesed
*
Uus
;
FILE
*
andmed
;
FILE
*
andmed
;
...
@@ -30,7 +28,7 @@ int main(void)
...
@@ -30,7 +28,7 @@ int main(void)
if
(
chkFile
(
andmed
)
==
0
)
if
(
chkFile
(
andmed
)
==
0
)
{
{
printf
(
"
ERROR
"
);
printf
(
"
Faili ei leitud!
"
);
return
0
;
return
0
;
}
}
...
@@ -54,10 +52,8 @@ int chkFile(FILE *andmed)
...
@@ -54,10 +52,8 @@ int chkFile(FILE *andmed)
void
sisse
(
FILE
*
andmed
,
Inimesed
*
Isik
)
void
sisse
(
FILE
*
andmed
,
Inimesed
*
Isik
)
{
{
int
i
=
0
;
int
i
=
0
;
//Isik = (Inimesed*)malloc(sizeof(Inimesed));
while
(
!
feof
(
andmed
))
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
fscanf
(
andmed
,
"%s %lf %s
\n\n
"
,
(
Isik
+
i
)
->
nimi
,
&
(
Isik
+
i
)
->
money
,
(
Isik
+
i
)
->
code
);
/// VIGA
i
++
;
i
++
;
}
}
...
...
praktikum 2.2/huihihih.o
View file @
d84c90a9
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment