    C++__________________________________691

char s[80], key[10] ;

strcpy(key,Editl->Text.c_str()); //   

do

{

fscanf(F, "%s", &s) ;

if(feof(F)|| !strcmp(s,key)) break;

>
while(true) ;

fclose(F);

if (!strcmp(s,key))

ShowMessage(" ");

      s   key,   
strcpy   .     fscanf   s -
     .  strcmp     -
.   0,   s  key .   ,   
    .

      .   
    .       -
 fprintf:

int fprintf(FILE *stream, const char *format[, argument, ...]);

      fscanf,  
   .     -
   ,    % .  
        .  , 
  ,    %,  -
   .    fprintf    -
      14   14.12.4.     -
 .

     s  (char *),   ,
   year,    .    
     ,     
,      ..., ... ...   
      .    -
 :

FILE *F;

if ((F = fopen("Test.txt", "wt")) == NULL)

{
ShowMessage("   ");

return;

}

char S [40];

int year = 1960;

strcpy(s,"");

fprintf(F, "\ %s, %i r.p.\n", &S, year);

fclose(F) ;

   fopen     .  -
     ,  .    ,   -
 .   fprintf    
.         , 
      \;     -
   ,   %s,      -
  S,   %i,       year,
      .      -
 :