C data structure
I notice that in C's built in library, it does not have some common data structures and sort rountines, such as stack, queue, linkedList, mergeSort, and quickSort. So I guess that we need to write our own data structure. ---1
I also notice that there are many source codes for data structure in C online. But unlike C++, C does not have template, so what I guess that when we use those available codes, we must modify them to make them meet for our own need. ---2
Am I right in these two ideas? Any reply will help! Thanks!!
Sometimes library functions (such as qsort()) take void pointers as arguments, so they can be passed anything, much like templates.
Thanks! I also post a similar question on the forum you inidicated.
You might have better luck here. :)
As far as I know there is no a "unique" solution. GCC and GLIBC provides many "hidden" utilities to manage trees, hashes, queues, a long list
The STANDARD C itself does not solve your questions as such things are considered to be solved trough libraries, that, can be found in many places over internet.
And beware, with the builtins's some functions are not portable, you must be aware between compiler implementors or platforms, so, if portability is a must for you, I would rather seek for a portable library that gives me the functionality I need.