| delorie.com/archives/browse.cgi | search |
| From: | "Alex Vinokur" <alexvn AT bigfoot DOT com> |
| Newsgroups: | comp.lang.c++,comp.os.msdos.djgpp,gnu.g++.help |
| Subject: | Re: Problem with basic_string |
| Date: | Sat, 4 Jan 2003 15:56:55 +0200 |
| Lines: | 34 |
| Message-ID: | <av6p7v$ciff4$1@ID-79865.news.dfncis.de> |
| References: | <av6mgq$cjiq1$1 AT ID-79865 DOT news DOT dfncis DOT de> <av6n2q$1ct4$1 AT serv3 DOT vsi DOT ru> |
| NNTP-Posting-Host: | pop03-2-ras4-p54.barak.net.il (212.150.99.54) |
| X-Trace: | fu-berlin.de 1041688640 13188580 212.150.99.54 (16 [79865]) |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.50.4522.1200 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4522.1200 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
"Ruslan Abdikeev" <ruslan AT vr1 DOT spb DOT ru> wrote in message news:av6n2q$1ct4$1 AT serv3 DOT vsi DOT ru...
> "Alex Vinokur" <alexvn AT bigfoot DOT com> wrote in message news:av6mgq$cjiq1$1 AT ID-79865 DOT news DOT dfncis DOT de...
[snip]
> >
> > int main ()
> > {
> > basic_string<string> bs1;
>
> I'm sure you were intended basic_string<char> bs1;
I intended exactly basic_string<string> bs1;
basic_string<T> is a template class.
So, I would like to basic_string<string>, basic_string<int>, basic_string<Any_Class>
>
> You cannot use basic_string<string>, because
> std::string is NOT a char-like type (which shall be POD).
>
> > bs1 += "ABC";
>
[snip]
--
=====================================
Alex Vinokur
mailto:alexvn AT go DOT to
http://mathforum.org/library/view/10978.html
=====================================
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |