Re: Type intializing with template
From: paul (psegaro_at_yahoo.com)
Date: 02/12/05
- Next message: ErUs: "re:edit control help"
- Previous message: Sanjeeva Reddy: "how to change the size of imazes in imagelist in vc++.net"
- In reply to: Antti Keskinen: "Re: Type intializing with template"
- Next in thread: Antti Keskinen: "Re: Type intializing with template"
- Reply: Antti Keskinen: "Re: Type intializing with template"
- Messages sorted by: [ date ] [ thread ]
Date: 12 Feb 2005 05:55:19 -0800
Antti,
Thanks for the reply,
The actual code I was working on had the enclosing template declaration
for the constructor. While writing the simplified description of the
problem posted here, I forgot that detail.
ref class B {
private:
static A<X,Y>^ a = gcnew A<X,Y>();
};
The above compiles ok in Visual c++ 2005. While the code below
ref class B {
private:
static A<X,Y>^ a = gcnew A<X,Y>::A();
};
gives C2061: syntax error : identifier '{ctor}
When I tried to follow your advice of using the assignment operation
outside the class' scope, in file scope, I got "static data members of
managed types must be defined within the class definition" error.
Thanks again for I was able to resolve the issue thanks to your, Carl's
and Bo's feedback.
ptrue
- Next message: ErUs: "re:edit control help"
- Previous message: Sanjeeva Reddy: "how to change the size of imazes in imagelist in vc++.net"
- In reply to: Antti Keskinen: "Re: Type intializing with template"
- Next in thread: Antti Keskinen: "Re: Type intializing with template"
- Reply: Antti Keskinen: "Re: Type intializing with template"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|