1 Replies - 1246 Views - Last Post: 18 December 2009 - 12:18 PM Rate Topic: -----

#1 jjl   User is offline

  • Engineer
  • member icon

Reputation: 1271
  • View blog
  • Posts: 4,998
  • Joined: 09-June 09

ArrayList

Post icon  Posted 18 December 2009 - 12:02 PM

I am trying to sort a massive data base by a few different elements. I have the hole data based pared and strored into a structure. Someone at work told me it would be easy to use an ArrayList because then it could do the sorting for you. As far as I know ArrayList are maneged C++ so my question is this. When I try adding a structure to the Arraylist it gets mad at me because it is not of type "System::Object_gc*". Does anywone know how i could cast this struct or somehow get this to work?

This post has been edited by ImaSexy: 18 December 2009 - 12:04 PM


Is This A Good Question/Topic? 0
  • +

Replies To: ArrayList

#2 NickDMax   User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: ArrayList

Posted 18 December 2009 - 12:18 PM

As far as I know ArrayList is not a sorted structure. In C++ you might as well use a vector -- you can use the STL sort algorithm to sort vectors (no need to write your own sort -- you just have to write your on comparison).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1