Convert Str to CString

Web Site  Methods

 
Str::GetCString
Equivalent to: Str::operator CString() const
 
CString GetCString() const
operator CString() const
Available only in modules using MFC

Use the GetCString method, or its equivalent typecast operator, to create a new MFC/ATL CString object containing a copy of the value of the Str object instance.

The CString typecast operator overload is particularly helpful in applications that have existing code accepting CString objects as function or method parameters.

 

See also: Basic operations