# [.net] generics

This topic is 4668 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, i am having a bit of a problem with making a dynamic array of floats in managed c++. I try
using namespace System::Collection::Generic;
List <float> floatList;


but that fails with the operators = and >= so i try with pointers to floats
using namespace System::Collection::Generic;
List <float^> floatList;


but again i get a error saying it cant be a System::Single ^ So i guess floats are not actual objects... Any ideas what i should use, or how i can fix it?

##### Share on other sites
What do use mean by:
Quote:
 but that fails with the operators = and >=

I have no problem using generic lists:
List<float> floatList = gcnew List<float>();
...

##### Share on other sites
it was just me being stupid, the compiler complained about something else in my code... but thanks for the reply

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633660
• Total Posts
3013221
×