DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Writing to a text file

  1. #1
    Sherry Guest

    Writing to a text file


    Hi. I'm working on an Offline Creation System. Basically, I'm trying to figure
    out how to write data from a form in Borland Builder C++ 5 to a text file.
    I don't know how to get the name of the text file to be input in by the user.
    I always get an error unless I hardcode the name in. The whole arrangement
    of file streams in this in confusing me. Can anyone help me out with a piece
    of sample code or an idea of where to look for more detail?

  2. #2
    Ramahi Guest

    Re: Writing to a text file


    "Sherry" <lady_revenge@hotmail.com> wrote:
    >
    >Hi. I'm working on an Offline Creation System. Basically, I'm trying to

    figure
    >out how to write data from a form in Borland Builder C++ 5 to a text file.
    >I don't know how to get the name of the text file to be input in by the

    user.
    >I always get an error unless I hardcode the name in. The whole arrangement
    >of file streams in this in confusing me. Can anyone help me out with a piece
    >of sample code or an idea of where to look for more detail?


    can you please send me the code the generates errof for you at the email
    address : mramahi@yahoo.com

    thanx

  3. #3
    jonnin Guest

    Re: Writing to a text file


    if you are using the standard opendialog, then it has a property that is a
    tstring with the name in it. You can save to that with savetofile(name).
    Look on the tool thing for the name of the properties, thats why its there...

    to use the standard dialog, add one. should be named opendialog1.
    then when user wants a save, opendioalog1->execute();
    and go from there.




    You could also use an edit box to read the file name.

    "Sherry" <lady_revenge@hotmail.com> wrote:
    >
    >Hi. I'm working on an Offline Creation System. Basically, I'm trying to

    figure
    >out how to write data from a form in Borland Builder C++ 5 to a text file.
    >I don't know how to get the name of the text file to be input in by the

    user.
    >I always get an error unless I hardcode the name in. The whole arrangement
    >of file streams in this in confusing me. Can anyone help me out with a piece
    >of sample code or an idea of where to look for more detail?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center