CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2010
    Posts
    4

    Pass to another text file while writing

    How to control the size of the text file that we want to write in and create another file if it passes our limit in vc++??
    i.e: Assume that we put the incoming messages to a logfile.txt, as soon as its size got bigger than 10mb, we must create another file, name logfile(2).txt and continue writing on this.. this goes like this...

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Pass to another text file while writing

    Close the first file and create/open the second file. What's the problem ?

  3. #3
    Join Date
    Jul 2010
    Posts
    4

    Re: Pass to another text file while writing

    how to check the size?

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Pass to another text file while writing

    Keep track of it as you write it out.

  5. #5
    Join Date
    Jun 2009
    Posts
    65

    Re: Pass to another text file while writing

    Seek to end upon opening then just add the return of Write functions, to track the size.

Tags for this Thread

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