🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10604

Re: wide string

#10604
From: Remy Lebeau (TeamB)
Date: Tue, 30 Mar 2004 20:41
15 lines
1443 bytes
"p Anders" <paul.anderson@jhuapl.edu> wrote in message
news:4069d5bd$1@newsgroups.borland.com...

> Can someone tell me how I convert between wide strings
> and the STL string object?

An std::string wraps a char*, not a wchar_t*.  As such, you need to convert
the wide string to an ansi string first.  Look at the WideCharToMultiByte()
function.  Or, if you are using the WideString class, then simply assign it
to an AnsiString first and then use AnsiString's c_str() method when
assigning to the std::string.


Gamb9t
Technical Details
Message-ID: <4069d931$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4069d5bd$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7b36b33c75b93d23
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-30 12:40:18 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4069d5bd$1@newsgroups.borland.com>
Subject: Re: wide string
Date: Tue, 30 Mar 2004 12:41:38 -0800
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <4069d931$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1080678705 67.22.138.253 (30 Mar 2004 12:31:45 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail