Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shake a window.. Pin
Anonymous2-Nov-02 15:08
Anonymous2-Nov-02 15:08 
QuestionSelecting a region into a DC? Pin
Michael Dunn2-Nov-02 12:16
sitebuilderMichael Dunn2-Nov-02 12:16 
AnswerRe: Selecting a region into a DC? Pin
Paul M Watt2-Nov-02 13:38
mentorPaul M Watt2-Nov-02 13:38 
GeneralFirst-chance Exception in C++ Runtime Pin
Roger Wright2-Nov-02 11:53
professionalRoger Wright2-Nov-02 11:53 
GeneralRe: First-chance Exception in C++ Runtime Pin
Ravi Bhavnani2-Nov-02 14:09
professionalRavi Bhavnani2-Nov-02 14:09 
GeneralRe: First-chance Exception in C++ Runtime Pin
Roger Wright2-Nov-02 18:29
professionalRoger Wright2-Nov-02 18:29 
GeneralCalendar Control Problem Pin
Anonymous2-Nov-02 11:00
Anonymous2-Nov-02 11:00 
GeneralReading binary files with c stdio fread Pin
Anonymous2-Nov-02 10:18
Anonymous2-Nov-02 10:18 
I thought the following would read in blocks of 15 floats from a binary file but after a bunch of correct reads all the output numbers are giberish, numbers like 1E-20 type stuff..

I have to use stdio routines like fread, I have written the same code with fstreams and it works fine. I am missing some stdio quirk or something.. It seems to get hosed when the _cnt variable in the FILE structure becomes < then the size of 15 floats (60).. I believe it has to do with the buffering of the file, which is the system 4096 size.

float CPDATA[15];
do{
fread((char*)CPDATA,sizeof(float)*15, 1, thO->fd);
//outfile read info to a file
outfile<<ftell(tho->fd)<<" ";
for(int i=0;i<15;i++)
outfile<
GeneralRe: Reading binary files with c stdio fread Pin
Anders Molin3-Nov-02 2:48
professionalAnders Molin3-Nov-02 2:48 
GeneralSerialization Progress Pin
Ted Christiansen2-Nov-02 9:42
Ted Christiansen2-Nov-02 9:42 
GeneralRe: Serialization Progress Pin
ian mariano2-Nov-02 9:51
ian mariano2-Nov-02 9:51 
GeneralPhilosophical question Pin
Chris Losinger2-Nov-02 9:21
professionalChris Losinger2-Nov-02 9:21 
Generallet me answer my own question... Pin
Chris Losinger2-Nov-02 9:46
professionalChris Losinger2-Nov-02 9:46 
GeneralRe: Philosophical question Pin
ian mariano2-Nov-02 9:42
ian mariano2-Nov-02 9:42 
GeneralRe: Philosophical question Pin
ColinDavies2-Nov-02 9:43
ColinDavies2-Nov-02 9:43 
GeneralRe: Philosophical question Pin
Gary R. Wheeler3-Nov-02 4:29
Gary R. Wheeler3-Nov-02 4:29 
GeneralRe: Philosophical question Pin
Chris Losinger2-Nov-02 9:49
professionalChris Losinger2-Nov-02 9:49 
GeneralRe: Philosophical question Pin
Chris Losinger3-Nov-02 5:33
professionalChris Losinger3-Nov-02 5:33 
GeneralRe: Philosophical question Pin
markkuk2-Nov-02 12:49
markkuk2-Nov-02 12:49 
GeneralRe: Philosophical question Pin
Chris Losinger2-Nov-02 13:34
professionalChris Losinger2-Nov-02 13:34 
GeneralRe: Philosophical question Pin
Anonymous4-Nov-02 4:17
Anonymous4-Nov-02 4:17 
GeneralRe: Philosophical question Pin
Gary R. Wheeler5-Nov-02 10:41
Gary R. Wheeler5-Nov-02 10:41 
QuestionDoes anyone know this error?? Pin
Pett2-Nov-02 8:50
Pett2-Nov-02 8:50 
AnswerRe: Does anyone know this error?? Pin
Anonymous2-Nov-02 13:42
Anonymous2-Nov-02 13:42 
GeneralRe: Does anyone know this error?? Pin
Pett3-Nov-02 4:48
Pett3-Nov-02 4: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.