X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Branimir Maksimovic" Newsgroups: comp.os.msdos.djgpp,comp.lang.c++ Subject: Re: Different results of compilation with gpp 2.95.3 and 3.0.4 Date: Thu, 21 Mar 2002 14:11:26 +0100 Organization: Public news server of EUnet Yugoslavia Lines: 47 Message-ID: References: NNTP-Posting-Host: p-1.156.eunet.yu X-Trace: news.eunet.yu 1016716287 5173 213.240.1.156 (21 Mar 2002 13:11:27 GMT) X-Complaints-To: abuse AT EUnet DOT yu NNTP-Posting-Date: Thu, 21 Mar 2002 13:11:27 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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:a7cg8d$k6fmh$1 AT ID-79865 DOT news DOT dfncis DOT de... > Here is some code. > It had no problem with gpp -> GNU C++ version 2.95.3 20010315/djgpp . > > What has been changed in gpp -> GNU C++ version 3.0.4 (djgpp) ? > > Does it mean that gpp version 2.95.3 is inconsistent with C++ Standard? > > Thanks. > > ............................... > #include > #include > #include > > template > string to_string (const T& val_i) std::string to_string (const T& val_i) > { > ostringstream osstr; std::ostringstream osstr; > osstr << val_i; > return osstr.str(); > } > > int main() > { > cout << to_string (123) << endl; > return 0; > } > I guess that gcc 3 now conforms with sandard , so better use namespace std; :) Greetings, Bane.