C语言困惑 - 变量与类型同名问题

#include <stdio.h>

typedef int (*pfun)(int a,int b);

int f(int a,int b)
{
    return printf("%d\n",a+b);
}

int main(void)
{
    pfun pfun = f;
    pfun(1,2);
    return 0;
}


  上面C语言片段中:
    pfun pfun = f;
    pfun(1,2);
  有问题么? 为什么?

女孩不哭 @ 2013-05-11 20:58:06 @ http://www.cnblogs.com/nbsofer

posted @ 2013-05-11 20:58  女孩不哭  阅读(464)  评论(5编辑  收藏  举报