Click here to Skip to main content
15,791,675 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: __int64 question Pin
Shay Harel4-Mar-04 7:42
Shay Harel4-Mar-04 7:42 
GeneralRe: __int64 question Pin
BlackDice4-Mar-04 6:57
BlackDice4-Mar-04 6:57 
GeneralRe: __int64 question Pin
Steve S4-Mar-04 7:49
Steve S4-Mar-04 7:49 
GeneralRe: __int64 question Pin
BlackDice4-Mar-04 9:47
BlackDice4-Mar-04 9:47 
GeneralRe: __int64 question Pin
Mike Dimmick4-Mar-04 7:08
Mike Dimmick4-Mar-04 7:08 
GeneralRe: __int64 question Pin
David Crow4-Mar-04 8:13
David Crow4-Mar-04 8:13 
GeneralRe: __int64 question Pin
Shay Harel4-Mar-04 8:37
Shay Harel4-Mar-04 8:37 
GeneralRe: __int64 question Pin
jbarton4-Mar-04 11:00
jbarton4-Mar-04 11: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 11:13
khb5-Jul-09 11:13 
GeneralRe: __int64 question Pin
basementman4-Mar-04 10:35
basementman4-Mar-04 10:35 
GeneralRe: __int64 question Pin
David Crow4-Mar-04 10:46
David Crow4-Mar-04 10:46 
QuestionCustom Build for Empty Project? Pin
Brian van der Beek4-Mar-04 6:19
Brian van der Beek4-Mar-04 6:19 
AnswerRe: Custom Build for Empty Project? Pin
basementman4-Mar-04 8:20
basementman4-Mar-04 8:20 
GeneralRe: Custom Build for Empty Project? Pin
Brian van der Beek5-Mar-04 6:09
Brian van der Beek5-Mar-04 6:09 
GeneralPOINTER TO DIALOG Pin
Caoimh4-Mar-04 6:16
Caoimh4-Mar-04 6:16 
GeneralRe: POINTER TO DIALOG Pin
Maximilien4-Mar-04 6:18
Maximilien4-Mar-04 6:18 
GeneralRe: POINTER TO DIALOG Pin
Caoimh4-Mar-04 6:52
Caoimh4-Mar-04 6:52 
GeneralRe: POINTER TO DIALOG Pin
Maximilien4-Mar-04 8:15
Maximilien4-Mar-04 8:15 
GeneralRe: POINTER TO DIALOG Pin
David Crow4-Mar-04 8:15
David Crow4-Mar-04 8:15 
GeneralRe: POINTER TO DIALOG Pin
BlackDice4-Mar-04 6:21
BlackDice4-Mar-04 6:21 
GeneralRe: POINTER TO DIALOG Pin
Robert A. T. Káldy4-Mar-04 23:40
Robert A. T. Káldy4-Mar-04 23:40 
Generalvisual c++ with opengl ( 3d Graphing) Pin
Jeff TTT4-Mar-04 6:12
Jeff TTT4-Mar-04 6:12 
GeneralHorizontal &amp; vertical print page Pin
Anonymous4-Mar-04 5:54
Anonymous4-Mar-04 5:54 
GeneralRe: Horizontal &amp; vertical print page Pin
basementman4-Mar-04 6:48
basementman4-Mar-04 6:48 
GeneralRe: Horizontal &amp; vertical print page Pin
Robert A. T. Káldy5-Mar-04 1:15
Robert A. T. Káldy5-Mar-04 1: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.