Topic: Templates & embeded classes
Author: dchiav01@scilab.uct.ac.za
Date: 1997/04/14 Raw View
i've got the following declarations:
template <class T>
class outclass
{
public:
outclass ();
class inclass
{
public:
inclass ();
}; // end class inclass
}; // end template class outclass
to define the constructor for outclass i write:
template <class T>
outclass<T> :: outclass ()
{ ... }
how do i define the constructor for the inclass ?
(or any other methods for this matter)
Note:
when i tried:
template <class T>
outclass<T> :: inclass :: inclass ()
{ ... }
i got the following errors:
type qualifier 'inclass' must be a struct or a class name
declaration terminated incorrectly
i am using borland turbo c++ 4.5 for windows
yavor (dchiav01@scilab.uct.ac.za)
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Date: 1997/04/14 Raw View
dchiav01@scilab.uct.ac.za writes:
>template <class T>
>outclass<T> :: inclass :: inclass ()
>{ ... }
>
>i got the following errors:
>
>type qualifier 'inclass' must be a struct or a class name
>declaration terminated incorrectly
>
>i am using borland turbo c++ 4.5 for windows
I think this is probably a compiler bug.
--
Fergus Henderson <fjh@cs.mu.oz.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@128.250.37.3 | -- the last words of T. S. Garp.
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]