Click here to Skip to main content
16,012,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to cast cstring into char*? Pin
vividwu22-Jun-04 7:32
vividwu22-Jun-04 7:32 
AnswerRe: how to cast cstring into char*? Pin
David Crow22-Jun-04 7:35
David Crow22-Jun-04 7:35 
GeneralRe: how to cast cstring into char*? Pin
Nitron22-Jun-04 8:04
Nitron22-Jun-04 8:04 
GeneralRe: how to cast cstring into char*? Pin
David Crow22-Jun-04 8:25
David Crow22-Jun-04 8:25 
GeneralRe: how to cast cstring into char*? Pin
Nitron22-Jun-04 8:48
Nitron22-Jun-04 8:48 
GeneralRe: how to cast cstring into char*? Pin
James R. Twine22-Jun-04 8:32
James R. Twine22-Jun-04 8:32 
GeneralRe: how to cast cstring into char*? Pin
vividwu22-Jun-04 8:13
vividwu22-Jun-04 8:13 
GeneralRe: how to cast cstring into char*? Pin
David Crow22-Jun-04 8:22
David Crow22-Jun-04 8:22 
There are only two ways of getting at the internal CString buffer. One is to use the LPCSTR operator and the other is to use the GetBuffer() method. One is read-only while the other is writeable. Since you did not indicate a need to update the buffer, I provided you with the LPCSTR way.

vividtang wrote:
i seldom have conscious to use LPCSTR LPSTR LPSTR

I do not understand this. Do you mean you seldom have a need to use them?


"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen


GeneralRe: how to cast cstring into char*? Pin
mtzlplyk22-Jun-04 10:47
mtzlplyk22-Jun-04 10:47 
AnswerRe: how to cast cstring into char*? Pin
vcplusplus22-Jun-04 7:44
vcplusplus22-Jun-04 7:44 
GeneralRe: how to cast cstring into char*? Pin
James R. Twine22-Jun-04 8:26
James R. Twine22-Jun-04 8:26 
GeneralRe: how to cast cstring into char*? Pin
palbano22-Jun-04 8:39
palbano22-Jun-04 8:39 
GeneralRe: how to cast cstring into char*? Pin
Nitron22-Jun-04 8:50
Nitron22-Jun-04 8:50 
GeneralRe: how to cast cstring into char*? Pin
James R. Twine22-Jun-04 11:00
James R. Twine22-Jun-04 11:00 
GeneralRe: how to cast cstring into char*? Pin
vividwu22-Jun-04 8:27
vividwu22-Jun-04 8:27 
GeneralRe: how to cast cstring into char*? Pin
Ryan Binns22-Jun-04 18:34
Ryan Binns22-Jun-04 18:34 
AnswerRe: how to cast cstring into char*? Pin
Nitron22-Jun-04 8:02
Nitron22-Jun-04 8:02 
GeneralRe: how to cast cstring into char*? Pin
David Crow22-Jun-04 8:24
David Crow22-Jun-04 8:24 
GeneralRe: how to cast cstring into char*? Pin
Nitron22-Jun-04 8:44
Nitron22-Jun-04 8:44 
GeneralRe: how to cast cstring into char*? Pin
David Crow22-Jun-04 9:20
David Crow22-Jun-04 9:20 
GeneralRe: how to cast cstring into char*? Pin
vividwu22-Jun-04 8:57
vividwu22-Jun-04 8:57 
GeneralRe: how to cast cstring into char*? Pin
palbano22-Jun-04 9:35
palbano22-Jun-04 9:35 
AnswerRe: how to cast cstring into char*? Pin
mtzlplyk22-Jun-04 10:33
mtzlplyk22-Jun-04 10:33 
GeneralSimple Question - About Box Pin
sweep12322-Jun-04 6:50
sweep12322-Jun-04 6:50 
GeneralRe: Simple Question - About Box Pin
Maximilien22-Jun-04 6:52
Maximilien22-Jun-04 6:52 

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.