    C++___________________________659

  ,   ,       
 strstr  NULL (  ).      
  (     ), 
 .

11.8.2.3  while

 while      
,    .   while:

while () ;

   .   , -
     .    true
( ),     ,    -
 ,  .    -
        ,   
 false ().        -
,    while.

      
 , ,    ,       .

   ,       fal-
se.    ,   , ..   -
 .     .   
          -
, ,  break,  ,   -
,    11.8.2.4.

  while      
  ,   -  . -
  ,      , ..  -
   .      ,  -
,      .     -
      -  ,   while -
 ,           
.       (   
 ),   .

         
Filel.txt  ,     
Editl.          -
 do...while,       while.  
  ,       
, ..     .       
,            .

FILE *F;

char S[256] = "";

AnsiString SKey = Editl->Text;

if((F = fopen("Filel.txt","r")) == NULL)
(
ShowMessage("  ");

return;

)

while!!feof(F)&&(strstr(S,SKey.c_str()) == NULL))
fgets(S,256,F);

fclose(F) ;

if (strstr(S,SKey.c_str()) == NULL)