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.;)
Printable View
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.;)
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.
hello,
as in the followin Code from the project ,
thank you for reply .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
}
I recommend serializing. Read the MFC documentation.
BTW, it's spelled "how"
Hello,
Oh sorry (How), can you help me to make it.