I am looking for a simple and elegant way of organizing containers in C. Most problems arise due to the inability to get the RTI. So, for example, suppose that there is a universal structure that stores data for QUEUE and STACK . It is clear that both such structures support PUSH and POP operations. But they are implemented in them in different ways.
Attention, a question: how to leave the general interface, but to avoid code duplication? Insert the switch...case inside the PUSH and POP also do not want.