Pay attention carefully because this is a hell of a question ;-)
I want to use template functions for generic collection actions (like search, foreach, etc.) in C wh
A recent question raised quite a few shameless preprocessor abusing libraries.
For information, the source code of GCC 4.6 implements similar tricks for vectors. Look into its file gcc/vec.h
If you are on Linux/BSD Unix, take a look at queue(3) and check into /usr/include/sys/queue.h
- it's been done before :)