I need a way to create 2 instances in C.
Here's the flow:-
orig_task_A sends messages to display_task() via interface_A();
orig_tast_B sends messages to display_task() via interface_B().
From the source of input (either interface_A() or interface_B()), display_task() knows whether the messages come from task_A and task_B.
My question is how can we create interface_A() and interface_B() which basically does the same thing, but serving different orig_task.
I know by creating an abstract class in C++, I can create as many instances I can. But I need to have a methology in C that does the same thing as C++ does.
Any idea anyone?