How to read and write struct using CArchive file?
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
See also :) :
void TestExchange(CArchive& ar, POINT& pt)
{
if (ar.IsStoring()) {
ar.Write(&pt, sizeof(POINT));
} else {
ar.Read(&pt, sizeof(POINT));
}
}They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)