Basic Queue Question (or possibly typedef or struct question)
Hey everyone, I have a quick question about queues.
So in a program I am making I need to make two queues, each of which will hold different typedef structs.
For example, I have:
1) typedef struct A
2) typedef struct B
In my program, I will have one queue of As and one queue of Bs.
Now, in the node struct for my queue, I obviously need to determine the type of data that the node will hold (as do I need to use the type for the various functions for the queue). Is there a way to set the type of data in node to be some generic type that can be either A or B? If not, is there any other solution other than creating two "sets" of queue nodes, functions, struct, ect.?
Any help is appreciated. If I'm not clear with my question, please tell me and I'll try to clarify.