Message-ID: <37B27F9B.B0579C90@softhome.net> Date: Thu, 12 Aug 1999 10:02:35 +0200 From: Laurynas Biveinis X-Mailer: Mozilla 4.61 [en] (Win98; I) X-Accept-Language: lt,en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: parse error on 'using namespace std;' References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > > On Thu, 5 Aug 1999, dnult wrote: > > > int main() { > > using std::copy; > > using std::cout; > > ... > > > > The compiler complains "In function int main(), parse error before 'using'". > > If I comment out the namespace specifiers the code compiles fine, (but > > doesn't run). > > GCC 2.8.1 doesn't support namespaces, AFAIK. The only support for namespaces in GCC 2.8.1 is that compiler compiles 'using namespace std;' as no-op. If you want full namespace support, EGCS 1.1.x and GCC 2.95 implements it. But standard C++ library of those compiler hasn't put in namespace std. It will be so in GCC 3.0. However, you can try to use flags -fhonor-std -DHONOR-STD (can't recall correctly) and see if it puts library in namespace std. Laurynas Biveinis