Click here to Skip to main content
15,884,237 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Confused in abby Pin
Neville Franks9-Jul-03 12:11
Neville Franks9-Jul-03 12:11 
GeneralProject Converter Pin
308holes9-Jul-03 10:56
308holes9-Jul-03 10:56 
GeneralRe: Project Converter Pin
Mustafa Demirhan9-Jul-03 12:44
Mustafa Demirhan9-Jul-03 12:44 
QuestionHow to keep rendering during user-input Pin
Led9-Jul-03 10:38
Led9-Jul-03 10:38 
AnswerRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 12:17
Neville Franks9-Jul-03 12:17 
GeneralRe: How to keep rendering during user-input Pin
Led9-Jul-03 12:51
Led9-Jul-03 12:51 
GeneralRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 13:08
Neville Franks9-Jul-03 13:08 
GeneralRe: How to keep rendering during user-input Pin
Led9-Jul-03 13:40
Led9-Jul-03 13:40 
GeneralRe: How to keep rendering during user-input Pin
Led9-Jul-03 13:51
Led9-Jul-03 13:51 
GeneralRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 15:35
Neville Franks9-Jul-03 15:35 
GeneralRe: How to keep rendering during user-input Pin
Ryan Binns9-Jul-03 17:05
Ryan Binns9-Jul-03 17:05 
GeneralRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 18:01
Neville Franks9-Jul-03 18:01 
GeneralModeless dialog with Child style Pin
DionChen9-Jul-03 10:04
DionChen9-Jul-03 10:04 

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.