Jump to content
  • Advertisement
Sign in to follow this  
zauron

[.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.

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
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);
...

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!