Topic: g++ and templates, help!
Author: uz@wuschel.ibb.schwaben.de (Ullrich von Bassewitz)
Date: Sat, 25 Jun 1994 08:59:27 GMT Raw View
Hermann Samso (ukra@rzstud1.rz.uni-karlsruhe.de) wrote:
> I have implemented a class stack<T> just as is described in
> Stroutrup C++ book... sadly g++ and cxx seem to complain when
> defining the function members as templates in a separate .C
> file. The error: function member undefined (for all functions
> defined in .C).
> Is this normal? should I define all template functions inline
> in the .H file?
Definition as inline is not needed, but the template functions have to be in
the header file.
Uz
--
Ullrich von Bassewitz Phone : +49 7071 440585
uz@ibb.schwaben.de Fax/Data : +49 7071 440588
Address : Zwehrenbuehlstrasse 33
D-72070 Tuebingen (Germany)
Author: ukra@rzstud1.rz.uni-karlsruhe.de (Hermann Samso)
Date: 24 Jun 1994 14:53:04 GMT Raw View
I have implemented a class stack<T> just as is described in
Stroutrup C++ book... sadly g++ and cxx seem to complain when
defining the function members as templates in a separate .C
file. The error: function member undefined (for all functions
defined in .C).
Is this normal? should I define all template functions inline
in the .H file?
Thanks for your patience...
Hermann
--
+---------------------------------------------------+
| The SpaceWalker . * _@ . .|
|Walkin' thru Cyberspace..... . o . </\_ o * |
|..aahhh! at home at last!!! . ~\/\ ' o|
|->ukra@rzstud1.rz.uni-karlsruhe.de . / . * |
+----------------------------------------`----------+