From: drathj01 AT xlab1 DOT fiu DOT edu (daniel k rathjens) Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp & templates Date: 14 May 1997 23:18:28 GMT Organization: Florida International University Lines: 20 Message-ID: <5ldh84$dr6@isis.fiu.edu> References: NNTP-Posting-Host: xlab1.fiu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk matra (matra AT diemme DOT it) spake thus: : 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 -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M/S d+(-) s+:- a-- C+++>$ ULSC++>+++$ P+? L++ E W++(+) N+++ o K w++ !O !M- V- PS PE+ Y-- PGP- t++@ !5 X+ R+ tv b+++ DI+ D+ G++ e+ h r y? ------END GEEK CODE BLOCK------