[.net] generics

Started by
1 comment, last by zauron 18 years, 1 month ago
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?
Advertisement
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>();
floatList.Add(1.0);
...
it was just me being stupid, the compiler complained about something else in my code... but thanks for the reply

This topic is closed to new replies.

Advertisement