Date: Thu, 15 May 1997 09:32:25 -0400 From: Bryan Murphy Subject: Re: djgpp & templates To: daniel k rathjens cc: djgpp AT delorie DOT com In-Reply-To: <5ldh84$dr6@isis.fiu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk > : This is my problem : this simple class doesn't compile ! > : WHY!??? ... :-<<<< > : template myclass::myclass(T tinf) > : { > : cout << "Hello World!" << endl; > : inf = tinf; > : } > you need to specify a type that the function is going to return. > template > void myclass::myclass(T tinf) > ^^^^ > like that Wrong, by omitting the void, the function would default to returning an int. Now, I don't remember what the rest of the template code looks like, but I'd bet it's an instantiation problem. I'd go back and look except I already deleted the original message.