Jūs esateŽurnalai / Ernestas Kardzys's blog / C++ List

C++ List


ParašėErnestas Kardzys - 2011 Balandžio 05

I was looking for analogue of ArrayList (or List) datatype in C++ and I found today: STL List :)

Take a look over here: http://www.cplusplus.com/reference/stl/list/

Yep, take a look: "List containers are implemented as doubly-linked lists". std::list is a double LINKED list, it is not an analog of ArrayList/List. Interesting, who was such an idiot and called vectors (or arrays) with the word "List" in Java/C#?

What you are looking for is std::vector.

Hey ;) Thanks for the comment ;)

Skelbti naują komentarą

Šio laukelio turinys bus laikomas privatus ir nerodomas viešai.
  • Web puslapiu adresai ir el. pašto adresai automatiškai tampa nuorodomis.
  • Leidžiamos HTML žymės: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Linijos ir paragrafai atskiriami automatiškai
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

Daugiau informacijos apie teksto formatavimą

CAPTCHA
Šis klausimas yra skirtas įsitikinti, jog jūs esate žmogus, ir sustabdyti automatinį šlamšto siuntimą.