CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    22

    how to delete data from the file

    I had a file here, and I want to go through the data in the file. Some data in the file don't need anymore, and we need delet those data and those related data as well. I want to know hoe to delete those data (and those related data) from the file. Anyone can help me out?
    Thank you for your time.
    P.S The file is not predefined file, and user could get the file from any directory. I have codes here for browsing the file in the directory (only for your reference)
    CString text2 = dlg.m_Text2;
    pik_in = fopen(text2, "r");
    .
    .
    .
    .


  2. #2
    Join Date
    Apr 1999
    Location
    California USA
    Posts
    15

    Re: how to delete data from the file

    Create another temporary file for writting and you will write all the data you want. Then, after reading from the data file, you can rename the temporary file to the data file. Hope this will give you some hints. Good luck.

    Allen


  3. #3
    Join Date
    Apr 1999
    Posts
    22

    Re: how to delete data from the file

    thank you for your respond. Do you think you can show me how to really create a temp file and put data into the temp file?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured