Click here to Skip to main content
15,898,987 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Convert CString to char* Pin
toxcct22-Aug-08 4:09
toxcct22-Aug-08 4:09 
GeneralRe: Convert CString to char* Pin
USAFHokie8022-Aug-08 4:13
USAFHokie8022-Aug-08 4:13 
GeneralRe: Convert CString to char* Pin
super_ttd22-Aug-08 5:05
super_ttd22-Aug-08 5:05 
GeneralRe: Convert CString to char* Pin
toxcct22-Aug-08 5:13
toxcct22-Aug-08 5:13 
AnswerRe: Convert CString to char* Pin
Perspx22-Aug-08 4:13
Perspx22-Aug-08 4:13 
GeneralRe: Convert CString to char* Pin
USAFHokie8022-Aug-08 4:16
USAFHokie8022-Aug-08 4:16 
GeneralRe: Convert CString to char* Pin
toxcct22-Aug-08 5:10
toxcct22-Aug-08 5:10 
GeneralRe: Convert CString to char* Pin
toxcct22-Aug-08 5:09
toxcct22-Aug-08 5:09 
NO, definitely not !
GetBuffer() is not there for casting purpose !
Moreover, the OP seem not to really know what he wants that for, so instead of saying amen to a query-for-code, better understand why such a thing is asked for...

I'm more likely to think he's trying to iterate on every characters of the string, so no need for cast for this ; a simple use of the [] operator would do !

BTW, I'm almost certain that Roger Allen (which is also a great codeproject member) would not reply so nowadays... notice that he replied so, but it was in year 2000 !

at last, read this[^] and tell me if you see somewhere in Microsoft recomendations to use GetBuffer().


modified on Friday, August 22, 2008 11:16 AM

GeneralRe: Convert CString to char* Pin
Perspx22-Aug-08 5:18
Perspx22-Aug-08 5:18 
GeneralRe: Convert CString to char* Pin
USAFHokie8022-Aug-08 5:34
USAFHokie8022-Aug-08 5:34 
GeneralRe: Convert CString to char* Pin
toxcct22-Aug-08 6:16
toxcct22-Aug-08 6:16 
GeneralRe: Convert CString to char* Pin
Mark Salsbery22-Aug-08 6:18
Mark Salsbery22-Aug-08 6:18 
GeneralRe: Convert CString to char* Pin
led mike22-Aug-08 5:37
led mike22-Aug-08 5:37 
JokeRe: Convert CString to char* Pin
toxcct22-Aug-08 6:17
toxcct22-Aug-08 6:17 
QuestionSearching for a sting in a CFile ? Pin
USAFHokie8022-Aug-08 4:01
USAFHokie8022-Aug-08 4:01 
AnswerRe: Searching for a sting in a CFile ? Pin
Wes Aday22-Aug-08 4:06
professionalWes Aday22-Aug-08 4:06 
GeneralRe: Searching for a sting in a CFile ? Pin
USAFHokie8022-Aug-08 4:11
USAFHokie8022-Aug-08 4:11 
AnswerRe: Searching for a sting in a CFile ? Pin
Hamid_RT22-Aug-08 4:35
Hamid_RT22-Aug-08 4:35 
AnswerRe: Searching for a sting in a CFile ? Pin
David Crow22-Aug-08 8:21
David Crow22-Aug-08 8:21 
QuestionHow to check whether user has delete permission on a file Pin
jpg64222-Aug-08 3:21
jpg64222-Aug-08 3:21 
QuestionUSB and CD ROM Enable/Disable Pin
ameyakoshti22-Aug-08 2:09
ameyakoshti22-Aug-08 2:09 
AnswerRe: USB and CD ROM Enable/Disable [modified] Pin
Perspx22-Aug-08 2:23
Perspx22-Aug-08 2:23 
QuestionRe: USB and CD ROM Enable/Disable Pin
ameyakoshti22-Aug-08 18:21
ameyakoshti22-Aug-08 18:21 
AnswerRe: USB and CD ROM Enable/Disable Pin
Jijo.Raj22-Aug-08 2:33
Jijo.Raj22-Aug-08 2:33 
AnswerRe: USB and CD ROM Enable/Disable Pin
vikas amin22-Aug-08 4:26
vikas amin22-Aug-08 4:26 

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.