Showing posts with label function pointer. Show all posts
Showing posts with label function pointer. Show all posts

Jan 18, 2009

How do you implement polymorphism in C?

How do you implement polymorphism in C?
Using Function Pointers
Like void qsort ( void * base, size_t num, size_t size, int ( * comparator ) ( const void *, const void * ) );
http://www.cprogramming.com/tutorial/function-pointers.html