Remix.run Logo
▲ layer8 16 hours ago

> Woah, iterating over pointers instead of indexes! […] However, I'm not sure how good an idea that is.

I’d recommend anyone (including the author) wanting to understand C to read K&R’s “The C Programming Language”, which among other things will illustrate how iterating over pointers is idiomatic in C (though not quite in the way the author’s example does it).

▲Joel_Mckay 15 hours ago | parent [-]

GLib simple C data structures:

https://docs.gtk.org/glib/data-structures.html#doubly-linked...

GSL GNU Scientific Library for C:

https://www.gnu.org/software/gsl/doc/html/intro.html

In general, no one should be custom building most basic structures in C these days. =3

▲pwdisswordfishq 14 hours ago | parent [-]

Yes. And this is what C++ iterators evolved from.