typedef 질문임돠..

하하의 이미지

다음과 같이..

typedef 을 사용할때

무슨 뜻인지 전혀 감이 안옵니다. ㅠㅠ;;

typedef void    func(int);

func *func_test(int, func *);

main()
{

}

앞의 typedef을 빼면.. 아래와 같은 에러가 발생합니다.

이유 설명 해 주실 분 계신가요? ..... 그럼. 즐거운 하루 되세요.

main.c:3: parse error before `*'
main.c:3: parse error before `func'
main.c:3: warning: data definition has no type or storage class
김충길의 이미지

func는 void ()(int) 타입의 함수 포인터 입니다.

하하 wrote:
다음과 같이..

typedef 을 사용할때

무슨 뜻인지 전혀 감이 안옵니다. ㅠㅠ;;

typedef void    func(int);

func *func_test(int, func *);

main()
{

}

앞의 typedef을 빼면.. 아래와 같은 에러가 발생합니다.

이유 설명 해 주실 분 계신가요? ..... 그럼. 즐거운 하루 되세요.

main.c:3: parse error before `*'
main.c:3: parse error before `func'
main.c:3: warning: data definition has no type or storage class

screen + vim + ctags 좋아요~