Loading - Serialization
Mobile
4
Posts
2
Posters
5
Views
1
Watching
-
I´m having a problem when a try to load: (*pArchive) >> m_nId; Do you have to do some kind of cast...?
What kind of problem (compile-time or run-time)? Normally you use the CArchive object as a reference, not as a pointer, but I cannot see why this should cause any problem.
-
What kind of problem (compile-time or run-time)? Normally you use the CArchive object as a reference, not as a pointer, but I cannot see why this should cause any problem.
-
The only reason I can think of is that you are trying to read more than you wrote to the file. I always try to make the serialization code symmetrical, i.e. for each insert I write an extract. This has worked seamlessly for me.