Newer
Older
c-interpreter / modules / test.c
Nomura Kei on 9 Aug 2023 306 bytes UPDATE
#include <stdio.h>

#define kc_add(a,b) _add_1(list, a, b)


struct 
{
	int (*_add_1)(int a, int b);
} Tmp;

int Tmp_add(int a, int b) {
	return (a+b);
}

int main()
{
	Tmp* tmp = (Tmp*) malloc(sizeof(Tmp));
	tmp->_add_1 = Tmp_add;


	int ret =tmp->kc_add(1,2);
	printf("ret = %d\n", ret);


	return 0;
}