Results 1 to 5 of 5

Thread: Whow I can Save Class on the File?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    15

    Smile Whow I can Save Class on the File?

    hello,
    Whow I can Save Class on The File , by using CFlie in Visual C++,
    I know that by use ( fstream.h ) in C++ , But I wont To Save File and locd it by CFile to use the New Teqnology.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    CFile and CArchive are not new technology, they are actually quite old. They are classes from the Microsoft Foundation Classes, a very Microsofty class library.

    The classes from <fstream> (not <fstream.h>, it is deprecated) however are part of the C++ standard and available everywhere.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    15
    hello,
    as in the followin Code from the project ,
    Code:
     void CSaveCalssToFileDlg::OnSaveCcate() 
    {
      CCat c1,c2;
      c1.name="cete";
      c1.age=2;
      c1.Color="whight";
    
      // whew I Can save c1 opject to file by CFile Class 
    }
    thank you for reply .
    Attached Files Attached Files

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I recommend serializing. Read the MFC documentation.

    BTW, it's spelled "how"
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    15
    Hello,
    Oh sorry (How), can you help me to make it.

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