lpcstr

How to find the length of an LPCSTR

I'm trying to convert an LPCSTR to an integer using atoi(), and to verify that the conversion occurred successfully I want to count the number of digits in the integer it produced and the original LPCSTR (it should contain nothing but integers) I'm having a hard time finding a good way to calculate the length of the LPCSTR. So far the ...

how can convert LPCSTR string into LPCTSTR string?

i am trying to convert a LPCSTR string into LPCTSTR string. i want to concatenate two string,when i try like this LPCTSTR str1 = L"Raja" LPCSTR str2 = "Kumar" wcscat_s(str1,(LPCTSTR)str2); i found the o/p like Raja....r(junkvalues)....how can typecast LPCSTR to LPCTSTR? ...

What does LPCWSTR stand for and how should it be handled with?

First of all, what is it exactly? I guess it is a pointer (LPC means long pointer constant), but what does "W" mean? Is it a specific pointer to a string or a pointer to a specific string? For example I want to close a Window named "TestWindow". HWND g_hTest; LPCWSTR a; *a = ("TestWindow"); g_hTest = FindWindowEx(NULL, NULL, NULL, a);...

convert std::string to LPCSTR with trailing or leading '\0'

Hi, How can I convert std::string to LPCSTR while preserving '\0' characters? I want to use the result on OPENFILENAME.lpstrFilter which requires the filter to contain '\0' as delimiters. std::string.c_str() seems to strip and trim '\0' Thanks in advance! ========================== (How do I properly add a comment to the responses...