Click here to Skip to main content
16,008,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Native c++ using VC++ 8.0 Pin
Cedric Moonen17-Jun-08 3:43
Cedric Moonen17-Jun-08 3:43 
GeneralRe: Native c++ using VC++ 8.0 Pin
Saurabh.Garg17-Jun-08 0:13
Saurabh.Garg17-Jun-08 0:13 
GeneralRe: Native c++ using VC++ 8.0 Pin
hogan.john17-Jun-08 2:29
hogan.john17-Jun-08 2:29 
GeneralRe: Native c++ using VC++ 8.0 Pin
Saurabh.Garg17-Jun-08 2:35
Saurabh.Garg17-Jun-08 2:35 
GeneralRe: Native c++ using VC++ 8.0 Pin
malaugh17-Jun-08 11:43
malaugh17-Jun-08 11:43 
GeneralRe: Native c++ using VC++ 8.0 Pin
Saurabh.Garg17-Jun-08 19:43
Saurabh.Garg17-Jun-08 19:43 
QuestionProblem Reading/Writing text/dat files Pin
Trupti Mehta16-Jun-08 21:52
Trupti Mehta16-Jun-08 21:52 
AnswerRe: Problem Reading/Writing text/dat files Pin
Mark Salsbery17-Jun-08 6:24
Mark Salsbery17-Jun-08 6:24 
Trupti Mehta wrote:
The Error basically says an attempt to read after the end of the file & then unhandled exception.


This isn't the correct way to loop through the archive:
while (true) {   
   od = (OperatorDetails*) ar.ReadObject( RUNTIME_CLASS(OperatorDetails) );    //************* I got to trap to stop   
   if (od == NULL)   
    break;   

ReadObject() throws exceptions instead of returning a NULL pointer.

You can either write a count value to the archive and retrieve it
when deserializing, or catch exceptions to break the loop.

I personally prefer the first method FWIW.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta17-Jun-08 7:52
Trupti Mehta17-Jun-08 7:52 
GeneralRe: Problem Reading/Writing text/dat files Pin
Mark Salsbery17-Jun-08 8:16
Mark Salsbery17-Jun-08 8:16 
GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta17-Jun-08 22:28
Trupti Mehta17-Jun-08 22:28 
GeneralRe: Problem Reading/Writing text/dat files Pin
Mark Salsbery18-Jun-08 6:13
Mark Salsbery18-Jun-08 6:13 
GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta18-Jun-08 22:57
Trupti Mehta18-Jun-08 22:57 
GeneralRe: Problem Reading/Writing text/dat files Pin
Mark Salsbery18-Jun-08 9:12
Mark Salsbery18-Jun-08 9:12 
GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta18-Jun-08 22:44
Trupti Mehta18-Jun-08 22:44 
GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta19-Jun-08 0:15
Trupti Mehta19-Jun-08 0:15 
GeneralRe: Problem Reading/Writing text/dat files Pin
Mark Salsbery19-Jun-08 6:04
Mark Salsbery19-Jun-08 6:04 
GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta19-Jun-08 22:38
Trupti Mehta19-Jun-08 22:38 
AnswerRe: Problem Reading/Writing text/dat files Pin
ThatsAlok17-Jun-08 16:45
ThatsAlok17-Jun-08 16:45 
GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta17-Jun-08 22:33
Trupti Mehta17-Jun-08 22:33 
GeneralRe: Problem Reading/Writing text/dat files Pin
ThatsAlok18-Jun-08 5:15
ThatsAlok18-Jun-08 5:15 
GeneralRe: Problem Reading/Writing text/dat files Pin
Trupti Mehta18-Jun-08 22:48
Trupti Mehta18-Jun-08 22:48 
Questiona error about c++ read xml Pin
huke198716-Jun-08 21:31
huke198716-Jun-08 21:31 
GeneralRe: a error about c++ read xml Pin
huke198716-Jun-08 22:01
huke198716-Jun-08 22:01 
GeneralRe: a error about c++ read xml Pin
ThatsAlok17-Jun-08 20:55
ThatsAlok17-Jun-08 20:55 

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.