Click here to Skip to main content
15,915,827 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDatabase recommendations and questions Pin
Chris Hambleton29-Aug-02 8:06
Chris Hambleton29-Aug-02 8:06 
GeneralRe: Database recommendations and questions Pin
Carlos Antollini29-Aug-02 8:27
Carlos Antollini29-Aug-02 8:27 
GeneralRe: Database recommendations and questions Pin
Joel Lucsy29-Aug-02 13:19
Joel Lucsy29-Aug-02 13:19 
GeneralListview problems!!! AAAAAAAaaaaaaaaa Pin
Ray Cassick29-Aug-02 7:57
Ray Cassick29-Aug-02 7:57 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Joaquín M López Muñoz29-Aug-02 8:29
Joaquín M López Muñoz29-Aug-02 8:29 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Michael Dunn29-Aug-02 9:02
sitebuilderMichael Dunn29-Aug-02 9:02 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Ray Cassick29-Aug-02 9:28
Ray Cassick29-Aug-02 9:28 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Michael Dunn29-Aug-02 9:43
sitebuilderMichael Dunn29-Aug-02 9:43 
It is incorrect because CString provides a read-only array. If you want to modify the string, you have to use CString methods or overloaded operators like +=.
Casting to LPCTSTR is fine, because CString provides that conversion itself, and still results in a read-only pointer. Casting that to a LPTSTR (which is not const) gives you a read-write pointer to a read-only buffer. It compiles (because casts override type checking), and it even runs in your case, but that doesn't make the code correct.
The correct way to get a non-const pointer to the CString's buffer is GetBuffer().

--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm

GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Joaquín M López Muñoz29-Aug-02 9:33
Joaquín M López Muñoz29-Aug-02 9:33 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Tomasz Sowinski29-Aug-02 9:38
Tomasz Sowinski29-Aug-02 9:38 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Michael Dunn29-Aug-02 9:47
sitebuilderMichael Dunn29-Aug-02 9:47 
GeneralHELP!!! Pin
Nitron29-Aug-02 7:18
Nitron29-Aug-02 7:18 
GeneralRe: HELP!!! Pin
Joaquín M López Muñoz29-Aug-02 7:26
Joaquín M López Muñoz29-Aug-02 7:26 
GeneralRe: HELP!!! Pin
Nitron29-Aug-02 7:54
Nitron29-Aug-02 7:54 
Generalforcing window repaint Pin
TimWallace29-Aug-02 7:14
TimWallace29-Aug-02 7:14 
GeneralRe: forcing window repaint Pin
Joaquín M López Muñoz29-Aug-02 7:17
Joaquín M López Muñoz29-Aug-02 7:17 
GeneralRe: forcing window repaint Pin
lucy29-Aug-02 9:59
lucy29-Aug-02 9:59 
GeneralLexical matching - wildcard type Pin
Sayan Mukherjee29-Aug-02 5:54
Sayan Mukherjee29-Aug-02 5:54 
GeneralRe: Lexical matching - wildcard type Pin
Chris Losinger29-Aug-02 6:04
professionalChris Losinger29-Aug-02 6:04 
GeneralEN_CHANGE and CEdit, simple question Pin
ns29-Aug-02 5:46
ns29-Aug-02 5:46 
GeneralRe: EN_CHANGE and CEdit, simple question Pin
Tomasz Sowinski29-Aug-02 5:49
Tomasz Sowinski29-Aug-02 5:49 
GeneralRe: EN_CHANGE and CEdit, simple question Pin
ns29-Aug-02 5:58
ns29-Aug-02 5:58 
GeneralRe: EN_CHANGE and CEdit, simple question Pin
Tomasz Sowinski29-Aug-02 6:07
Tomasz Sowinski29-Aug-02 6:07 
GeneralRe: EN_CHANGE and CEdit, simple question Pin
Roger Allen29-Aug-02 5:56
Roger Allen29-Aug-02 5:56 
GeneralVery cool! Pin
ns29-Aug-02 6:03
ns29-Aug-02 6:03 

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.