--- glogic_1 <[EMAIL PROTECTED]> wrote:

> Hey all
> sorry if the posts twice the first time gave me an
> error. basically 
> i just need to know how to move to next line of a
> text file if the 
> first word does not match the word searched for.
> using borland builder this what i have so far. ive
> checked loads of 
> tutorials on th net just cant seem to find what i
> need . or is there 
> a better way to do this altogether?
> cheers
> g
> 
> 
> String filename;
>         string FileCompare = {""};
>         filename=InputBox("FileOpen", "Enter name of
> file to 
> Open","");
> 
>         ifstream file;
> 
>         file.open("AsteroidsSave.txt");
> 
>         if(!file)
> 
>         {
> 
>                
> Form1->Canvas->TextOutA(20,300,"UNABLE TO OPEN 
> FILE!!");
> 
> 
> 
>         }
>         else
>         {
>                 while(file)
> 
>                 {
>                    file >> FileCompare;
>                 
>                    if (filename.c_str() ==
> FileCompare)
>                    {
>                     Form1->Canvas->TextOutA
> (20,300,"worked!               " ) ;
>                         file >> theShip.points[0].x
> ;
> 
>                    }
>                    else
>                    {
>                    //next line code??
>                    }
> 
>                
> 
>                 }//end while
>         }
> 
> 
> 
>        
> 
>         file.close();
> 
> 
> 
> 


  Form1->Canvas->TextOutA
> (20,300,"worked!               " ) ;

One comment - you should use Application->MessageBox()
to display messages to the user. The Canvas property
will not repaint and the message will be lost.

Example : Application->MessageBox("This should be on
top.", "Look", MB_OK);




Mickey M.
Construction Partner Inc.
http://www.constructionpartner.com


 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

Reply via email to