heres my actual code:
Code:
#include <iostream>class a
{
public:
int b;
void hello(); //adding these on macro
};
#define ClassWithEvents(DerivedClass,InstanceName) \
class InstanceName : public DerivedClass {}InstanceName;
ClassWithEvents(a, c);
ClassWithEvents(a, d);
using namespace std;
int main()
{
c.b=10;
d.b=20;
cout << c.b << d.b;
return 0;
}
see the class 'a':
Code:
class a{
public:
int b;
void hello(); //adding these on macro
};
and now see the macro:
Code:
#define ClassWithEvents(DerivedClass,InstanceName) \
class InstanceName : public DerivedClass {}InstanceName;
using macros, how can i add the functions prototype between blocks\breaks?