you should consider to use a linked list

--
Pedro Taranto


On Thu, Aug 4, 2011 at 4:26 AM, Kerry Thompson <al...@cyberiantiger.biz>wrote:

> Deepak Sahu wrote:
>
> > consider a vector..its faster than array.
>
> It is. There are a couple of essential differences you should know of.
> Primarily, all the elements of the vector need to be of the same type.
> I think it will work with objects.
>
> The other difference is that you can't have empty elements in a
> vector. This is perfectly legal for an array:
>
> arr[0] = 0;
> arr[1] = 1;
> arr[100] = 100;
>
> You have 99 empty elements in that array--that is, there is nothing in
> arr[2]...arr[99].
>
> You can't do that with a vector. I think the compiler will throw an
> error. If not, you'll get an error at runtime.
>
> Cordially,
>
> Kerry Thompson
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to