help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using std::wstring


From: Jamiil
Subject: Re: Using std::wstring
Date: 22 Oct 2004 16:03:17 -0700

Thanks for the help Guy!
A long time ago I wrote a class wrapper for what I found to be some of
the most common methods in std::string. In the past few days I have
seen the word "UNICODE" and/or "Internationalization" popping up on my
desk, so I have decided to make my programs multicultural ready. C++
has this "std::wstring" that might be the bridge to achieve my goal.
However, using cygwin as my Win development platform I have not even
been able to compile the simplest of programs.
If you know what to do to compile this program using GCC, I would be
most grateful.

Thanks in advance

Guy Harrison <swamp-DEL-dog@ntlworld.com> wrote in message 
news:<g14alc.gq82.ln@sd-if.swampdog>...
> Jamiil wrote:
> 
> > This my class
> > #include <string>
> > 001 class TTest{
> > 002   private:
> > 003       std::string str;
> > 004       std::wstring wstr;
> > 005 };
> > 
> > I am using Cygwin-GCC 3.3.3 under MSW.
> > Make reports an error syntax error before ; token at line 004.
> > 
> > Does anyone know what I am doing wrong?
> 
> Nope, that ought to work for wchar_t supporting target so looks like you
> need to ask on cygwin (or grep the headers for wstring typedef). You can
> search their mailing lists off this link...
> 
> http://cygwin.com/lists.html
> 
> I can't tell what you're up to from the above snippet of course but perhaps
> you want (the equivelent of)...
> 
> /*typedef*/ std::basic_string< TCHAR >  /*myString*/
> 
> ...if you grep the winapi headers (it'll take a lot of grepping but its in
> there somewhere!) you'll note that definition of TCHAR varies between
> "char" and "wchar_t" depending upon UNICODE (see MSDN).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]