delorie.com/archives/browse.cgi | search |
From: | fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson) |
Subject: | Re: problem with inner classes in template functions |
22 May 1997 19:46:57 -0700 : | |
Approved: | cygnus DOT gnu-win32 AT cygnus DOT com |
Distribution: | cygnus |
Message-ID: | <199705220324.NAA29943.cygnus.gnu-win32@mundook.cs.mu.OZ.AU> |
Original-To: | glier AT stud DOT uni-frankfurt DOT de (Oliver Glier) |
Original-Cc: | gnu-win32 AT cygnus DOT com (Cygnus GNU-win32 mailing list) |
In-Reply-To: | <3382BFCB.89F0591C@stud.uni-frankfurt.de> from "Oliver Glier" at May 21, 97 11:26:35 am |
X-Mailer: | ELM [version 2.4 PL24] |
Original-Sender: | owner-gnu-win32 AT cygnus DOT com |
Oliver Glier, you wrote: > > template<class C> > void createIterator(const C&) > { > C::Iterator it; > it.setnull(); > } .... > The compiler always yields a syntax error at the line with > "C::Iterator it;" in function createIterator(). The compiler is correct. The above is not valid C++ syntax (no matter what all those other compilers do). I think the correct syntax is typename C::Iterator it; ^^^^^^^^ This syntax is a fairly recent addition to C++, and I have no idea whether the cygwin g++ supports it yet (and no intention of rebooting my Linux box in W95 mode to find out ;-). -- Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au> | "I have always known that the pursuit WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit" PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |