Click here to Skip to main content
16,011,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: __int64 question Pin
Shay Harel4-Mar-04 6:42
Shay Harel4-Mar-04 6:42 
GeneralRe: __int64 question Pin
BlackDice4-Mar-04 5:57
BlackDice4-Mar-04 5:57 
GeneralRe: __int64 question Pin
Steve S4-Mar-04 6:49
Steve S4-Mar-04 6:49 
GeneralRe: __int64 question Pin
BlackDice4-Mar-04 8:47
BlackDice4-Mar-04 8:47 
GeneralRe: __int64 question Pin
Mike Dimmick4-Mar-04 6:08
Mike Dimmick4-Mar-04 6:08 
GeneralRe: __int64 question Pin
David Crow4-Mar-04 7:13
David Crow4-Mar-04 7:13 
GeneralRe: __int64 question Pin
Shay Harel4-Mar-04 7:37
Shay Harel4-Mar-04 7:37 
GeneralRe: __int64 question Pin
jbarton4-Mar-04 10:00
jbarton4-Mar-04 10:00 
I prefer to write a global operator>> and operator<< for datatypes like this, so that I can still use the syntax of a stream operator with the archive.

<br />
CArchive& operator<<( CArchive& archive, __int64 value )<br />
   {<br />
   archive.Write( &value, sizeof(__int64) );<br />
   return archive;<br />
   }<br />
<br />
CArchive& operator>>( CArchive& archive, __int64 value )<br />
   {<br />
   archive.Read( &value, sizeof(__int64) );<br />
   return archive;<br />
   }<br />


This works for simple data types. I use this for bool as VC6.0 doesn't implement serialization for bool, but this should also work fine for __int64.

Best regards,
John
GeneralRe: __int64 question Pin
khb5-Jul-09 10:13
khb5-Jul-09 10:13 
GeneralRe: __int64 question Pin
basementman4-Mar-04 9:35
basementman4-Mar-04 9:35 
GeneralRe: __int64 question Pin
David Crow4-Mar-04 9:46
David Crow4-Mar-04 9:46 
QuestionCustom Build for Empty Project? Pin
Brian van der Beek4-Mar-04 5:19
Brian van der Beek4-Mar-04 5:19 
AnswerRe: Custom Build for Empty Project? Pin
basementman4-Mar-04 7:20
basementman4-Mar-04 7:20 
GeneralRe: Custom Build for Empty Project? Pin
Brian van der Beek5-Mar-04 5:09
Brian van der Beek5-Mar-04 5:09 
GeneralPOINTER TO DIALOG Pin
Caoimh4-Mar-04 5:16
Caoimh4-Mar-04 5:16 
GeneralRe: POINTER TO DIALOG Pin
Maximilien4-Mar-04 5:18
Maximilien4-Mar-04 5:18 
GeneralRe: POINTER TO DIALOG Pin
Caoimh4-Mar-04 5:52
Caoimh4-Mar-04 5:52 
GeneralRe: POINTER TO DIALOG Pin
Maximilien4-Mar-04 7:15
Maximilien4-Mar-04 7:15 
GeneralRe: POINTER TO DIALOG Pin
David Crow4-Mar-04 7:15
David Crow4-Mar-04 7:15 
GeneralRe: POINTER TO DIALOG Pin
BlackDice4-Mar-04 5:21
BlackDice4-Mar-04 5:21 
GeneralRe: POINTER TO DIALOG Pin
Robert A. T. Káldy4-Mar-04 22:40
Robert A. T. Káldy4-Mar-04 22:40 
Generalvisual c++ with opengl ( 3d Graphing) Pin
Jeff TTT4-Mar-04 5:12
Jeff TTT4-Mar-04 5:12 
GeneralHorizontal &amp; vertical print page Pin
Anonymous4-Mar-04 4:54
Anonymous4-Mar-04 4:54 
GeneralRe: Horizontal &amp; vertical print page Pin
basementman4-Mar-04 5:48
basementman4-Mar-04 5:48 
GeneralRe: Horizontal &amp; vertical print page Pin
Robert A. T. Káldy5-Mar-04 0:15
Robert A. T. Káldy5-Mar-04 0:15 

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.