1. Computing

A Tale of Three Hashes for C Programmers

By October 7, 2009

Follow me on:

Compared to other programming languages, C is pretty devoid of fancy ways of storing data "out of the box" with just arrays, structs, pointers and function pointers (my favorite!) as the basic building blocks. It requires you to either code your own or use a 3rd party library.

So here are three different examples of open source libraries on Sourceforge.net that you might find useful. I've created a new page for them with more detail so I've just listed them briefly here.

  • uthash. Makes any struct hashable by adding one field.
  • Judy. Scalable dynamic sparse array with easy insert, delete, retrieve, sort, search and more facilities
  • SGLIB. Simple, generic library that has linked lists, trees all accesses through simple Macros.
So there's something for everyone. if you know of any others, let me know and I'll add them.
Comments
October 8, 2009 at 2:55 am
(1) Lennie De Villiers says:

Hi, What about an article on there use?

October 8, 2009 at 3:04 am
(2) l says:

Wow, SGLIB made it here? :)
It was written by 2 of my teachers. :)

October 8, 2009 at 10:56 am
(3) Gorden says:

How did programming challenge 27 turn out?

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.