Click here to Skip to main content
15,886,851 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Fast serialization Pin
Budric B.19-Sep-07 10:53
Budric B.19-Sep-07 10:53 
GeneralRe: Fast serialization Pin
David Crow19-Sep-07 10:55
David Crow19-Sep-07 10:55 
GeneralRe: Fast serialization Pin
Budric B.19-Sep-07 11:10
Budric B.19-Sep-07 11:10 
GeneralRe: Fast serialization Pin
David Crow20-Sep-07 2:38
David Crow20-Sep-07 2:38 
AnswerRe: Fast serialization Pin
Mark Salsbery19-Sep-07 11:52
Mark Salsbery19-Sep-07 11:52 
GeneralRe: Fast serialization Pin
Budric B.20-Sep-07 6:08
Budric B.20-Sep-07 6:08 
QuestionRe: Fast serialization Pin
led mike19-Sep-07 12:04
led mike19-Sep-07 12:04 
AnswerRe: Fast serialization Pin
Nathan Holt at EMOM19-Sep-07 12:07
Nathan Holt at EMOM19-Sep-07 12:07 
I get the impresion that Voxels is an object with actual behavior, and therefore shouldn't be written to a file like that. Things like virtual function table pointers can't be saved and restored that way. Also, it looks like Voxels is a relatively small object with a pointer to a huge array, so you wouldn't lose much performance by saving the simple members of Voxels individually. I would save the simple members of Voxels first and then save the array with one file.write call. To restore it, I'd create a Voxels object, read the simple members, and then allocate and read the array.

Also, I noticed you are using unsigned int for the size to write to the file. If you use size_t, the type will be adjusted properly if you migrate to a 64 bit system.

Nathan
GeneralRe: Fast serialization Pin
Budric B.20-Sep-07 6:19
Budric B.20-Sep-07 6:19 
GeneralRe: Fast serialization Pin
Nathan Holt at EMOM20-Sep-07 8:59
Nathan Holt at EMOM20-Sep-07 8:59 
QuestionTrapping DDE messages Pin
__DanC__19-Sep-07 6:16
__DanC__19-Sep-07 6:16 
AnswerRe: Trapping DDE messages Pin
Roger Broomfield19-Sep-07 18:25
Roger Broomfield19-Sep-07 18:25 
GeneralRe: Trapping DDE messages Pin
__DanC__19-Sep-07 22:48
__DanC__19-Sep-07 22:48 
QuestionHelp out with compiler error C2327 Pin
Chris Meech19-Sep-07 4:34
Chris Meech19-Sep-07 4:34 
AnswerRe: Help out with compiler error C2327 Pin
led mike19-Sep-07 4:39
led mike19-Sep-07 4:39 
GeneralRe: Help out with compiler error C2327 Pin
Chris Meech19-Sep-07 5:11
Chris Meech19-Sep-07 5:11 
AnswerRe: Help out with compiler error C2327 Pin
Mike Dimmick19-Sep-07 4:44
Mike Dimmick19-Sep-07 4:44 
GeneralRe: Help out with compiler error C2327 Pin
Chris Meech19-Sep-07 5:09
Chris Meech19-Sep-07 5:09 
GeneralRe: Help out with compiler error C2327 Pin
carrivick19-Sep-07 5:46
carrivick19-Sep-07 5:46 
Questionhow to insert a checkbox as an item in a multicolumn lsi control (CListCtrl)) [modified] Pin
Dhiraj kumar Saini19-Sep-07 3:39
Dhiraj kumar Saini19-Sep-07 3:39 
AnswerRe: how to insert a checkbox as an item in a multicolumn lsi control (CListCtrl)) Pin
David Crow19-Sep-07 5:27
David Crow19-Sep-07 5:27 
Questionwant to add pictures of any type in a dialog box Pin
Dhiraj kumar Saini19-Sep-07 3:31
Dhiraj kumar Saini19-Sep-07 3:31 
AnswerRe: want to add pictures of any type in a dialog box Pin
led mike19-Sep-07 4:42
led mike19-Sep-07 4:42 
AnswerRe: want to add pictures of any type in a dialog box Pin
David Crow19-Sep-07 5:29
David Crow19-Sep-07 5:29 
GeneralRe: want to add pictures of any type in a dialog box Pin
Mark Salsbery19-Sep-07 6:48
Mark Salsbery19-Sep-07 6:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.