"JustSomeGuy" <> wrote in message
news:...
> Andrew Koenig wrote:
>
>> "JustSomeGuy" <> wrote in message
>> news:...
>>
>> > Can you access elements of the std::list like they were an array?
>>
>> No. If you wanted, you could write your own function to achieve the same
>> effect, but it's not generally possible to do so efficiently.
>>
>> What are you trying to do?
>
> I think the answer I was looking for was to switch to a vector class
> instead of the list class.
std::vector should be the default-choice container.
However, depending on the operations that you need to perform
(e.g. adding/removing items, FIFO, sorting, etc), another
standard container (std::deque or even std::set) could be
a better choice.
( The information you have provided does not allow for a definite
recommendation, which is why Andrew asked you for more details. )
Regards,
Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form