Click here to Skip to main content
15,902,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: destroy a dialog in a MFC application Pin
Mark Salsbery9-May-08 6:15
Mark Salsbery9-May-08 6:15 
Questionfputc or fgetc returning odd results Pin
Klempie9-May-08 2:03
Klempie9-May-08 2:03 
AnswerRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 2:28
Klempie9-May-08 2:28 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 2:37
Rajkumar R9-May-08 2:37 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 2:40
Klempie9-May-08 2:40 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 2:50
Klempie9-May-08 2:50 
AnswerRe: fputc or fgetc returning odd results [modified] Pin
Rajkumar R9-May-08 3:38
Rajkumar R9-May-08 3:38 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 4:15
Klempie9-May-08 4:15 
OK. It looks as if it is reading EOF but the binary format of the file has 1A (26) as the last byte.

Firstly, the app is reading 255 which is the non-2s complement of -1 which is EOF. Why isn't it reading the 26 at all?

Second, what if there exists valid data equalling 255 that is not supposed to be the EOF? how do you tell the filestream to read it as such and keep the stream open?
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 4:21
Rajkumar R9-May-08 4:21 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 4:28
Klempie9-May-08 4:28 
AnswerRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 4:48
Klempie9-May-08 4:48 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 5:05
Rajkumar R9-May-08 5:05 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 4:56
Rajkumar R9-May-08 4:56 
AnswerRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 5:06
Klempie9-May-08 5:06 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 5:10
Rajkumar R9-May-08 5:10 
AnswerRe: fputc or fgetc returning odd results Pin
toxcct9-May-08 3:06
toxcct9-May-08 3:06 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 3:38
Klempie9-May-08 3:38 
GeneralRe: fputc or fgetc returning odd results Pin
toxcct9-May-08 3:45
toxcct9-May-08 3:45 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 3:47
Klempie9-May-08 3:47 
GeneralRe: fputc or fgetc returning odd results Pin
toxcct9-May-08 3:50
toxcct9-May-08 3:50 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 3:53
Klempie9-May-08 3:53 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 4:27
Rajkumar R9-May-08 4:27 
GeneralRe: fputc or fgetc returning odd results Pin
CPallini9-May-08 5:01
mveCPallini9-May-08 5:01 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 5:06
Klempie9-May-08 5:06 
QuestionMemory allocation help. Pin
chandu0049-May-08 1:06
chandu0049-May-08 1:06 

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.