468,103 Members | 1,307 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,103 developers. It's quick & easy.

C2955: Where's the difference?

Hi,

I'm using VC++ 2008. This is the code:

namespace TestNamespace
{
generic <class T>
ref class C1
{
};

ref class C2
{
private:
List<TestNamespace::C1^>^ var1;
List<C1^>^ var2; //C2955
};
};

Why does declaration of var1 work whereas var2 produces C2955? I don't see
the difference because "TestNamespace::" is optional in this case. Do I miss
something again?
Armin

Oct 11 '08 #1
1 913
Armin Zingler wrote:
Hi,

I'm using VC++ 2008. This is the code:

namespace TestNamespace
{
generic <class T>
ref class C1
{
};

ref class C2
{
private:
List<TestNamespace::C1^>^ var1;
List<C1^>^ var2; //C2955
};
};

Why does declaration of var1 work whereas var2 produces C2955? I don't see
the difference because "TestNamespace::" is optional in this case. Do I
miss
something again?
Armin:

Good question. But they both work if you supply the type for the generic.

--
David Wilkinson
Visual C++ MVP
Oct 11 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

37 posts views Thread by michele.simionato | last post: by
13 posts views Thread by Thomas Zhu | last post: by
20 posts views Thread by Frank-O | last post: by
41 posts views Thread by Miroslaw Makowiecki | last post: by
1 post views Thread by skaterplus | last post: by
4 posts views Thread by Kevin D. Smith | last post: by
15 posts views Thread by student4lifer | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.