0
헤더 파일을 만들기 위해 클래스에서받은 설명이 다소 명확하지 않습니다. 제 교수는 헤더 파일을 작성하면 함수 프로토 타입을 포함하려고합니다. 포인터 토큰을 포함하는 함수 프로토 타입에 오류가 계속 발생합니다. 내 헤더 파일 :GCC에서 헤더 파일을 사용하는 컴파일러 오류 수정
#ifndef A3_H
#define A3_H
void list_init(record_list*);
void list_destroy(record_list*);
int list_insert(record_list*, const record*);
int input_record(record*);
#endif
내가 받고있어 오류는 다음과 같습니다
$ gcc -ansi -W -Wall -pedantic -c a3.c
In file included from a3.c:4:0:
a3.h:4:27: error: expected ‘)’ before ‘*’ token
a3.h:5:30: error: expected ‘)’ before ‘*’ token
a3.h:6:29: error: expected ‘)’ before ‘*’ token
a3.h:7:24: error: expected ‘)’ before ‘*’ token
나는 헤더 파일에 함수 프로토 타입의 포인터를 포함 할 수없는 건가요?
이들은 내 구조가 될 것이므로 헤더 파일에도 정의해야합니다. – MacSalty
@SpaceJesus 전방 선언으로 충분합니다. – stefan
그랬습니다. 환상적! 대단히 감사합니다. Andy! – MacSalty