String Manipulations
- From: "Mark" <mark_ivey4@xxxxxxxxx>
- Date: Tue, 22 Nov 2005 13:52:14 -0500
Can anyone provide information for how to retrieve the actual character
string from a CString object?
I am using the following code but it only returns the address of the string
and not the literal characters of the string. I know it has to be something
simple that I am overlooking but I have copied samples from MS that are
supposed to work but give the same results
CString strSports("Hockey is Best!");
TCHAR sz[1024];
lstrcpy(sz, strSports);
cout << strSports ;
If I follow documentation provided by Microsoft which states:
// while this line will put the content of the string out:
cout << (LPCTSTR) strSports;
I still only receive the address of the CString object at the console.
Please help!
.
- Follow-Ups:
- Re: String Manipulations
- From: Igor Tandetnik
- Re: String Manipulations
- Prev by Date: Re: Will the following code assert:
- Next by Date: Re: String Manipulations
- Previous by thread: Will the following code assert:
- Next by thread: Re: String Manipulations
- Index(es):
Relevant Pages
|
Loading