From: "Ruslan Abdikeev" Newsgroups: comp.lang.c++,comp.os.msdos.djgpp,gnu.g++.help Subject: Re: Problem with basic_string Date: Sat, 4 Jan 2003 16:20:25 +0300 Organization: VoronezhSvyazInform ISP News Server Lines: 34 Message-ID: References: NNTP-Posting-Host: 62.16.120.98 X-Trace: serv3.vsi.ru 1041686426 45988 62.16.120.98 (4 Jan 2003 13:20:26 GMT) X-Complaints-To: postmaster AT vsi DOT ru NNTP-Posting-Date: Sat, 4 Jan 2003 13:20:26 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Alex Vinokur" wrote in message news:av6mgq$cjiq1$1 AT ID-79865 DOT news DOT dfncis DOT de... > > I have some problem with basic_string. > What is wrong ? > > // File t1.cpp > #include > using namespace std; > > int main () > { > basic_string bs1; I'm sure you were intended basic_string bs1; You cannot use basic_string, because std::string is NOT a char-like type (which shall be POD). > bs1 += "ABC"; Actually, if it was possible to instantiate basic_string, it would be an equivalent to bs1 += string("ABC"); that is, for ordinary strings (basic_string), an equivalent to bs1 += 'a'; Hope it helps, Sincerely, Ruslan Abdikeev Brainbench MVP for Visual C++ http://www.brainbench.com