keyword overloading
Apr 16, 2009 at 9:53am
can i overload keywords in c++ to make them perform different operations than the regular ones that they perform like
1 2 3 4
|
class ABC
{
//some code
};
|
here can i make class perform a different function
Apr 16, 2009 at 12:15pm
No, you can only override (most) operators.
Apr 16, 2009 at 12:36pm
thanks for the reply but i already know that i just want to know is there any "illegal" way of doing it
Apr 16, 2009 at 12:40pm
you can modify the keyword using preprocessor definitions:
eg:
1 2 3 4 5 6
|
#define class int
#define ABC ABC()
class ABC
{
//some code
};
|
Should make your class a function
Apr 16, 2009 at 1:28pm
yeah it works out great thanks,man this thing has great capabilities
Topic archived. No new replies allowed.