|
From: Jason H. <jas...@bt...> - 2002-04-08 00:02:58
|
I think I have encountered a similar problem to this before, although I can't remember what exactly
it was but the solution is along the lines of:
template<class DT> class A
{
static int x;
}
template<class DT> int A<DT>::x = 0;
I've not tested it but I hope it at least give you clue as to where to start.
There is some variation between compiler versions, as templates are a fairly new and complex
addition to C++.
Hope this helps, Jason.
----- Original Message -----
From: "Julian Calderon Almendros" <jul...@er...>
To: "Ioannis Vranos" <no...@ho...>; "Dev-C++" <dev...@li...>
Sent: Sunday, April 07, 2002 10:58 PM
Subject: RE: [Dev-C++] static members
The authentic problem is:
template<unsigned n> class A
{
static int x;
};
int A<n>::x=0;//??n??
>int main(void)
>{
> A a;
>
> return 0;
>}
>
>Ioannis
Thanks.
Julian.
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|