Declaration for object for which creation is wrapped in macro
- by learner
The following macro is defined in our code:
#define MSGMacro(obj, arg) MyPaymentClass obj(arg)
Where MSGMacro is used to creates the object of type MyPaymentClass using code like
MSGMacro(Card, 1);
MSGMacro(Cash, 2);
----
---- //removed unwanted things to keep question cleaner.
All the above code is in one cpp file, Now the problem is how we can expose these two objects of MyPaymentClass to other units in my project?
i.e. I want to use Card and Cash in other CPP files. Please suggest how I can give the declaration for the same in some header file?