Skip to content
0:00 / 0:00

#pointers#pointers-to-pointers#linked-lists

Triple Ref Pointers - Computerphile

Computerphile

2.6M subscribers • 70 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Professor Brailsford

Intermediate. Assumes working knowledge.

153K views9 years ago2 recommendations

Computer scienceProgramming languagesCData structuresMemory management

Professor Brailsford explains how pointers to pointers can simplify code when working with linked lists.

The 'magic' trick of pointers to pointers - Professor Brailsford explains how what might seem complicated will actually simplify your code. (See Extra Bits video for a code walkthrough) The Professor's Code: bit.ly/Computerphile_ProfBrails_TripleRef EXTRA BITS - Triple Ref Code: youtu.be/1s0w_p5HEuY n.b. Message from the Prof: Many thanks to all of you who have pointed out that I got over excited at the end of this video and (on the LEGO model) did the pointer reassignment in the wrong order. The correct way ( in the model once again) was to do the short pointer first and the longer pointer second - which I think is done correctly in the downloadable C program. facebook.com/computerphile twitter.com/computer_phile This video was filmed and edited by Sean Riley. Computer Science at the University of Nottingham: bit.ly/nottscomputer Computerphile is a sister project to Brady Haran's Numberphile. More at bradyharan.com

Why it's here

2 people recommend this

What people say. Recommended as an excellent explanation of pointers-to-pointers and dynamic memory in C.

u/velorekin r/C_Programming • Recommends

On “Ast3r0id: My first ever game in C with SDL2”

Thank you! The asteroids and projectiles are represented as a linked list, for example. Check out these videos from computerphile, they are really great to understand pointers and dynamic memory. They helped me a lot: link to this video link to this video

u/mcvoid1in r/C_Programming • Recommends

On “What's the use of pointers-to-pointers?”

The things I use them for: * double pointers: when an "output" parameter to a function is an array of something. Like telling the function, "put the array in here". * double and triple pointers: data structure cursors. This video explains it better than other stuff I've seen on the interwebs. link to this video