generic data structure in C [duplicate]
问题 This question already has answers here : Simulation of templates in C (for a queue data type) (10 answers) Closed 4 years ago . Is there any way to create generic data structure in C and use functions in accordance with the stored data type, a structure that has various types of data and for example can be printed according to the stored data. For example, Suppose I wish to make a binary search tree that has just float's, int's stored. The natural approach to do would be to create an