• pazukaza@lemmy.ml
    link
    fedilink
    arrow-up
    10
    ·
    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.