Macro and function with same name

前端 未结 5 881
我在风中等你
我在风中等你 2020-12-01 15:00

I have the following code

#define myfunc(a,b) myfunc(do_a(a), do_b(b))

void myfunc(int a, int b)
{
  do_blah(a,b);
}
int main()
{
    int x = 6, y = 7;
             


        
5条回答
  •  被撕碎了的回忆
    2020-12-01 15:59

    Why can you not change the source code? At worst, if you need to maintain the original version, run a patch on it to create a temporary file in which the function is renamed and build it from there.

提交回复
热议问题