'2018/06'에 해당되는 글 1건

  1. 2018/06/09 함수 포인터 반환하는 함수
#include <stdio.h>
void callback(void (*cb)())
{
        cb();
}
void test()
{
        printf("hello world!\n");
}
void (*test2(int a))()
{
        printf("%d\n", a);
        return test;
}
int main(int argv, char** args)
{
        callback(test);
        callback(test2(1));
}

void (*)() -> void (* 함수원형 ) ()
2018/06/09 16:15 2018/06/09 16:15
Posted by 메케메케