LPCSTR and CHARS
I have a list of chars (a total of 23 if you''re interested) and I want to place them neatly into a LPCSTR. How can I do this? Oh, in case it''s relevant, the chars are mostly characters. However, there are two numbers.
Any ideas?
Come on, you guys are smarter than me... well, if you''re not, I''m stuffed.
The past was unknown, the future was predicted.
the future is just like the past, just later. - TANSTAAFL
An LPCSTR is a long pointer to a CString, I believe. Therefore, I think you have to create a CString object and initialize it with your 23 characters. You can probably do something like
LPCSTR pString = new CString(TCHAR("My long string here"));
For more info, go to msdn.microsoft.com and search for CString and/or LPCSTR
LPCSTR pString = new CString(TCHAR("My long string here"));
For more info, go to msdn.microsoft.com and search for CString and/or LPCSTR
January 01, 2003 08:34 PM
an LPCSTR is MS''s way of saying long pointer to a constant string. a string that is not meant to be modified, i.e., read-only.
Read only? Hmm... oh well. Never caused me problems before. Thanks for the help peoples...!
The past was unknown, the future was predicted.
The past was unknown, the future was predicted.
the future is just like the past, just later. - TANSTAAFL
CHAR is same as char but hurts the eyes more to read...
LPCTSTR is a "long pointer to a constant tchar " or in other words a const char *.
LPCTSTR is a "long pointer to a constant tchar " or in other words a const char *.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
CHAR is same as char but hurts the eyes more to read...
LPCTSTR is a "long pointer to a constant tchar string" or in other words a const char *.
LPCTSTR is a "long pointer to a constant tchar string" or in other words a const char *.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Gee wizz! I didn''t know so many people would reply!!!!! That makes me sound really unsocial considering only 3 different people have replied! I am sooo going to shup up now!
The past was unknown, the future was predicted.
The past was unknown, the future was predicted.
the future is just like the past, just later. - TANSTAAFL
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement