Click here to Skip to main content
16,011,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Initialize empty buffer Pin
chandu00412-Oct-07 1:38
chandu00412-Oct-07 1:38 
GeneralRe: Initialize empty buffer Pin
David Crow12-Oct-07 2:54
David Crow12-Oct-07 2:54 
GeneralRe: Initialize empty buffer Pin
chandu00412-Oct-07 3:10
chandu00412-Oct-07 3:10 
GeneralRe: Initialize empty buffer Pin
David Crow12-Oct-07 3:40
David Crow12-Oct-07 3:40 
GeneralRe: Initialize empty buffer Pin
chandu00412-Oct-07 5:44
chandu00412-Oct-07 5:44 
GeneralRe: Initialize empty buffer Pin
David Crow12-Oct-07 5:49
David Crow12-Oct-07 5:49 
GeneralRe: Initialize empty buffer Pin
chandu00412-Oct-07 6:21
chandu00412-Oct-07 6:21 
GeneralRe: Initialize empty buffer Pin
Nelek12-Oct-07 4:01
protectorNelek12-Oct-07 4:01 
In this case won't work, because the tempBufferWrite is 256 chars long, but the string that is being written in the file is "text of letters" (16 chars), and note that there is no string to have length of. The code gives the "..." directly, not going through the buffer.

char tempBufferWrite[256] = "Test of letters" ; // or {}
openFile.Write(&tempBufferWrite, strlen(tempBufferWrite)) ;


That should work. What you proposed just changing sizeof with strlength must not.

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

GeneralRe: Initialize empty buffer Pin
chandu00412-Oct-07 5:54
chandu00412-Oct-07 5:54 
GeneralRe: Initialize empty buffer Pin
CodingLover14-Oct-07 17:52
CodingLover14-Oct-07 17:52 
AnswerRe: Initialize empty buffer Pin
toxcct12-Oct-07 2:06
toxcct12-Oct-07 2:06 
GeneralRe: Initialize empty buffer Pin
CodingLover14-Oct-07 17:57
CodingLover14-Oct-07 17:57 
AnswerRe: Initialize empty buffer Pin
Mike Dimmick12-Oct-07 6:13
Mike Dimmick12-Oct-07 6:13 
GeneralRe: Initialize empty buffer Pin
CodingLover14-Oct-07 18:01
CodingLover14-Oct-07 18:01 
QuestionHelp with MSDN Pin
gReaen11-Oct-07 23:40
gReaen11-Oct-07 23:40 
AnswerRe: Help with MSDN Pin
CodingLover12-Oct-07 0:48
CodingLover12-Oct-07 0:48 
AnswerRe: Help with MSDN Pin
Nishad S12-Oct-07 1:16
Nishad S12-Oct-07 1:16 
QuestionRe: Help with MSDN Pin
David Crow12-Oct-07 2:57
David Crow12-Oct-07 2:57 
AnswerRe: Help with MSDN Pin
Mike Dimmick12-Oct-07 6:24
Mike Dimmick12-Oct-07 6:24 
QuestionCArray --> afxtempl.h(443) : error C2582 Pin
sdancer7511-Oct-07 23:29
sdancer7511-Oct-07 23:29 
AnswerRe: CArray --> afxtempl.h(443) : error C2582 Pin
Nibu babu thomas11-Oct-07 23:34
Nibu babu thomas11-Oct-07 23:34 
AnswerRe: CArray --> afxtempl.h(443) : error C2582 Pin
David Crow12-Oct-07 2:58
David Crow12-Oct-07 2:58 
GeneralRe: CArray --> afxtempl.h(443) : error C2582 Pin
sdancer7514-Oct-07 20:21
sdancer7514-Oct-07 20:21 
GeneralRe: CArray --> afxtempl.h(443) : error C2582 Pin
David Crow15-Oct-07 3:15
David Crow15-Oct-07 3:15 
QuestionStatic size Pin
johnalek11-Oct-07 23:14
johnalek11-Oct-07 23:14 

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.