Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Feasability Question: C++ / UDP / MSSQL Pin
palbano22-Jun-04 9:47
palbano22-Jun-04 9:47 
Generalsaving modified BMPs Pin
TFB22-Jun-04 8:32
TFB22-Jun-04 8:32 
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 
CString str;<br />
const char *cp = (LPCSTR) str;<br />
char *p = (LPSTR) ((LPCSTR) str); 


   Truth be told, he answered the Original Poster's question perfectly.  The OP did not ask if it was safe or even a good idea to cast a CString into a non-const char*...!  (Which, of course, we all know is generally not a good idea at all!)

   Peace!

-=- James
Tip for SUV winter driving survival: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"!
Articles -- Products: Delete FXP Files & Check Favorites

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 
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 

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.