Sign in to follow this  

[.net] generics

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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>();
floatList.Add(1.0);
...

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this