Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
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?
0 · ·