Re: convert string to LPSTR by GuitarBill
GuitarBill
Thu Aug 19 07:36:19 CDT 2004
No,
LPSTR is always char*
LPWSTR is always wchar_t*
LPTSTR is either char* or wchar_t* depending on _UNICODE
Similarly,
CHAR = char
WCHAR = wchar_t
TCHAR = either char or wchar_t depending on _UNICODE
"benben" <benhongh@yahoo.com.au> wrote in message
news:O6QKYVehEHA.3928@TK2MSFTNGP11.phx.gbl...
> Hi Maileen,
>
> a LPSTR is NOT always a char*. Depending on what operating system you are
> using, LPSTR can be defined as char* or wchar_t*. But you can always
safely
> use TCHAR to address individual characters.
>
> ben
>
> > Sorry i forgot to use .c_str(); :(
> >
> >
> > Maileen wrote:
> >
> > > Hi,
> > >
> > > I know that LPSTR is a char*.
> > > I would like to convert a string (from std namespece) to a LPSTR.
> > >
> > > nowhere i found a tutorial/help about it.
> > > i was thining to cast it into char* but it's not correct.
> > >
> > > thanks for help.
> > >
> > > Maileen
> > >
> >
>
>