Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

C++ Basic Skills: 38 - Lists

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,411
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 5, 2011

The last container we're talking about which is Lists. Also known as Double-Linked-Lists.

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (outofmylaboratory)

  • thankyou, this has helped loads....

    i just have one query...

    when u inserted an element, the list printed out {0,0,10,11,0,0}

    you then removed the 4th element with myList.erase(insertIt)...

    surely this would result in the list printing...

    {0,0,10,0,0}

    however, yours produced...

    {0,0,10,0}

    where did the 5th element go?

  • @hsncool When I was demonstrating removing an element, I overwrote the code that added in the 11. So it was actually the original array {0, 0, 10, 0, 0} that I was calling erase() on.

see all

All Comments (16)

Sign In or Sign Up now to post a comment!
  • @trappingnoobs yes its called map

  • is advance global function ?

    in c++11 standard we can do this way

    pastebin(dot)com/ebwWwxgA

  • @RedBooster

    ..yet

  • @BLOOMS This is only true is the newest Visual Studio, this is not standardized or portable.

  • Isn't an array the best way to go for storing almost anything? Does C++ have an equivalent for Dictionaries?

  • Just finished watching all of your videos again Duncan. Very nice job overall! They are just the right level of complexity for people who've maybe programmed in C++ before, and are coming back to it. A very nice introduction/review. Thanks again for all of the work you've done on these--I bet Generation 2 of your earlier videos will be even better.

  • I've been looking up videos all afternoon trying to figure out how exactly linked lists work and why the hell pointers are even useful. The picture you used in the beginning explained more in the first minute of your video then the rest I've been watching all day. It finally clicked for me! Thank you thank you thank you!

  • thank you for showing me the draw back to using list. I tried using the replace function from "algorithm" but that would change all the 0's to 10 and not just the third element.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more