--- In [email protected], Raj Singh <rsjen...@...> wrote: > > I need to define a function x_y() as its mandatory to implement in my layer. > But we want definition of z() for that > So i do something like this in x.c: > > void x_y() > { > } > #undef x_y
(The #undef doesn't do anything, because x_y hasn't been #define'd.) > #define x_y z > > It works. Hi Raj - what do you mean by 'it works'? Attempting to call x_y() results in a call to z(), and it becomes impossible to call x_y() - is that what you want? If so, it 'works' because the preprocessor just replaces occurrences of x_y after the #define with z. Does that help?
