Outpost Universe Forums

Off Topic => Computers & Programming General => Topic started by: leeor_net on September 15, 2017, 05:37:24 AM

Title: The Standard Template Library
Post by: leeor_net on September 15, 2017, 05:37:24 AM
So I've been working on yet another C project because I can. Lincity for those who are interested (see my work on GitHub (https://github.com/ldicker83/lincity)).

Anyway, I've been working with C for awhile and thinking how great it would be to have the generic container types as provided in the standard C++ libraries. It's amazing how useful generic containers are and you don't realize just how awesome they are until you don't have then anymore.

Anyway, I came across a header based C library (https://troydhanson.github.io/uthash/) that implements hash table functions to achieve functionality similar to C++'s std::map. I just committed it and it works beautifully (if perhaps not the sleekest library ever conceived of).