659
you are viewing a single comment's thread
view the rest of the comments
[-] MavTheHack@lemmy.fmhy.ml 14 points 1 year ago

Wait we can have pointers to other pointers? Wouldn't that be redundant?

[-] pazukaza@lemmy.ml 9 points 1 year ago

I guess this is beating a dead horse but you can have pointers to pointers for 2D arrays.

The first pointer tells you which coulm you're on. The second pointer tells you which is the first object of each column. That way you can iterate the columns without loosing a reference to the current column you're standing on.

load more comments (12 replies)
this post was submitted on 13 Jul 2023
659 points (96.6% liked)

Programmer Humor

32365 readers
564 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS