Now I want to append that to a string or concat it.
You can't. It is just a pointer, not a string, and furthermore, it's const, so whatever it's pointing to cannot be changed.
Are you coding in C++? If you are, why not use CString, std::string, std::wstring, or some other string classes, instead of trying to do things with pointers?
All right... !
I knew that in LPCSTR/LPCTSTR P meant pointer and C meant const... ! But it never occurred to me that its a constant pointer and cannot be concatenated or appended... !
Thank you... ! You enlightened me ! I think I would not forget this in future.. ! i am a newbie ! and yes... it is VC++ !
I will try it out with std::string !
Thanks again !
All right... !
I knew that in LPCSTR/LPCTSTR P meant pointer and C meant const... ! But it never occurred to me that its a constant pointer and cannot be concatenated or appended... !
Thank you... ! You enlightened me ! I think I would not forget this in future.. ! i am a newbie ! and yes... it is VC++ !
I will try it out with std::string !
Thanks again !
If you are using Visual C++ and a fairly recent compiler (newer than 10 years old), then consider using CString over std::string or std:wstring.
Bookmarks