関数ポインタ

#include <stdio.h>

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

int(*p_funcA)(int, int);

int main()
{
	funcA(3, 9);
	p_funcA = funcA;
	
	p_funcA(3, 9);
	system("pause");
	return 0;


}

int型(* p_funcA)(int型、int型);

関数は、パラメータの種類と数およびタイプに基づいて値を返します

公開された29元の記事 ウォンの賞賛3 ビュー3173

おすすめ

転載: blog.csdn.net/qq_38436175/article/details/104043772