.


:




:

































 

 

 

 


8.




 

: ; OpenDialog SaveDialog; .

 

. :

struct erson {

char Fio[30];

double sball;

};

:

Person Stud, *p_Stud;

:

1) (.) :

ID_. ID_ (* ). ID_

2) (>) :

> ID_ &(ID_). ID_

1) Stud.Fio = ..; //

Stud.sball = 5.75;

2) _Stud > Fio = ..;

_Stud > sball =5.75;

C/++ (stream), . .

, . stdio. h io. h.

, , .. , : , .. /++ fopen (), . , .. , . :

FILE * ;

fopen ( 1, 2);

1 , , : d:\\work\\sved.txt sved.txt, d, work; , .

2 :

w , , , , ;

r ; , ;

a ;

r +, w + ;

a + , a, , .

(t), b .

, fopen NULL.

fclose ( ), , fclose (f);

: void fcloseall (void);

, :

#include <stdio.h>

...

FILE *f_my;

if(! (f_my = fopen(rez.txt, r+t))) {

puts(\n !);

// ShowMessage (" ");

return;

}

... //

fclose(f_my);

...

fprintf () fscanf (), printf () scanf (), (. ..1), , .

.

. , fp (FILE * fp;):

1) int fread (void * ptv, int size, int n, fp) n size fp , ptv ( );

2) int fwrite (void * ptv, int size, int n, fp) n size , ptv fp;

3) int fileno (fp) fp ( , );

4) long filelength (int ) ;

5) int chsize (int , long pos) fp, pos;

6) int fseek (fp, long size, int kod) size kod: 0 ; 1 ; 2 ;

7) long ftell (fp) fp (-1 );

8) int feof ( ) ;

9) int fgetpos ( , long * pos) pos ; 0.

 





:


: 2018-10-15; !; : 189 |


:

:

- - , .
==> ...

1916 - | 1867 -


© 2015-2024 lektsii.org - -

: 0.012 .