Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help with IF statement Pin
DaveE9th9-Jul-03 21:28
DaveE9th9-Jul-03 21:28 
GeneralRe: help with IF statement Pin
Ted Ferenc9-Jul-03 21:45
Ted Ferenc9-Jul-03 21:45 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 21:51
professionalRage9-Jul-03 21:51 
GeneralRe: help with IF statement Pin
DaveE9th9-Jul-03 21:54
DaveE9th9-Jul-03 21:54 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 23:01
professionalRage9-Jul-03 23:01 
GeneralRe: help with IF statement Pin
DaveE9th10-Jul-03 7:26
DaveE9th10-Jul-03 7:26 
GeneralThe UINT range problem in MFC. Pin
Kevein9-Jul-03 17:54
Kevein9-Jul-03 17:54 
GeneralRe: The UINT range problem in MFC. Pin
Neville Franks9-Jul-03 18:04
Neville Franks9-Jul-03 18:04 
GeneralRe: The UINT range problem in MFC. Pin
Kevein13-Jul-03 15:20
Kevein13-Jul-03 15:20 
GeneralAuto Device Driver Installation.. Pin
Member 4048139-Jul-03 15:25
Member 4048139-Jul-03 15:25 
GeneralRe: Auto Device Driver Installation.. Pin
IceMatrix10-Jul-03 8:50
IceMatrix10-Jul-03 8:50 
GeneralThread Programming & Matlab Pin
samr679-Jul-03 14:50
samr679-Jul-03 14:50 
GeneralRe: Thread Programming & Matlab Pin
Abbas_Riazi9-Jul-03 18:17
professionalAbbas_Riazi9-Jul-03 18:17 
GeneralRe: Thread Programming & Matlab Pin
samr679-Jul-03 19:08
samr679-Jul-03 19:08 
GeneralRe: Thread Programming & Matlab Pin
kochhar10-Jul-03 14:32
kochhar10-Jul-03 14:32 
Questionfwrite error??? Pin
will13839-Jul-03 11:15
will13839-Jul-03 11:15 
AnswerRe: fwrite error??? Pin
Led9-Jul-03 11:23
Led9-Jul-03 11:23 
GeneralRe: fwrite error??? Pin
will13839-Jul-03 11:26
will13839-Jul-03 11:26 
GeneralRe: fwrite error??? Pin
will13839-Jul-03 11:32
will13839-Jul-03 11:32 
GeneralRe: fwrite error??? Pin
Neville Franks9-Jul-03 12:14
Neville Franks9-Jul-03 12:14 
AnswerRe: fwrite error??? Pin
Mustafa Demirhan9-Jul-03 12:54
Mustafa Demirhan9-Jul-03 12:54 
Firstly, your code should be like this:

fwrite(dataPtr, sizeof(unsigned char), datalength, filePtr);

It does not make any difference in case of a char, but if you use integers for example, your code will try to write 4x4xdatalength = 16xdatalength bytes of data, instead of writing 4xdatalength bytes.

Anyway, apart from that be sure to check the datalength. Check out whether it is 0 or not.

If it still does not work, add the following line after writing to the file:

fflush (filePtr);

Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix

<nobr>They say I'm lazy but it takes all my time
GeneralFinally! Pin
will138310-Jul-03 1:14
will138310-Jul-03 1:14 
GeneralConfused in abby Pin
PJ Arends9-Jul-03 11:03
professionalPJ Arends9-Jul-03 11:03 
GeneralRe: Confused in abby Pin
Led9-Jul-03 11:26
Led9-Jul-03 11:26 
GeneralRe: Confused in abby Pin
PJ Arends9-Jul-03 11:32
professionalPJ Arends9-Jul-03 11:32 

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.