X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Alex Vinokur" Newsgroups: comp.os.msdos.djgpp,gnu.g++.help Subject: Re: gpp 3.0.4 & stl_iterator.h Date: Wed, 24 Apr 2002 08:36:17 +0200 Organization: Scopus Lines: 84 Message-ID: References: NNTP-Posting-Host: gateway.scopus.net (62.90.123.5) X-Trace: fu-berlin.de 1019626490 7728851 62.90.123.5 (16 [79865]) 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 "Sean Chen" wrote in message news:aa1d66$23t$1 AT skates DOT gsfc DOT nasa DOT gov... | | "Alex Vinokur" wrote in message | news:aa0jtb$6ot7t$1 AT ID-79865 DOT news DOT dfncis DOT de... | > | > "Alex Vinokur" wrote in message | news:a9ucus$62ivj$1 AT ID-79865 DOT news DOT dfncis DOT de... | > | ========================================================= | > | GNU CPP version 3.0.4 (cpplib) (80386, BSD syntax) | > | GNU C++ version 3.0.4 (djgpp) compiled by GNU C version 3.0.4. | > | Configured with: ../configure | i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disable-nls | > | Thread model: single | > | | > | Windows-2000 | > | ========================================================= | > | | > | | > | Here is compilation results. | > | | > | What may be wrong? | > | | > | > [snip] | > | > | > ###### C++ code : Source file : BEGIN ###### | > // File x1.cpp | > | > | > #include | > #include | > #include | > using namespace std; | > | > #define CODE unsigned int | > | > | > // ------------------------------ | > // ------------------------------ | > template | > void func1 (const vector& vector_i, const string& delimiter_i = " ") | > { | > strstream tmp_strstream; | > ostream_iterator out (tmp_strstream, delimiter_i.c_str ()); | ^^^^ | | | | If T1 is a vector you should do get the error messages | since there isn't an implemetation (at least in gcc 3.0.4 I think, is it?) | for a vector, e.g., "vec" such that the ostream operator "<<", e.g., "cout | << vec << endl;" works | you will need to implement it by yourself. | | | | | | | > | > copy (vector_i.begin (), vector_i.end (), out); | > | > } | [snip] Thanks. Now it is OK. P.S. It seems that gcc/gpp-2.95.3 had no problem with a similar code. -- ==================== Alex Vinokur http://up.to/alexvn http://go.to/alexv_math mailto:alexvn AT bigfoot DOT com mailto:alexvn AT go DOT to ====================