이클립스에서는 함수 정의가 여러 개 있음을 알 수 있습니다. 나는 그 실수를 발견 할 수 없다. 이이 헤더입니다C에서 여러 함수 정의, 프로토 타이핑
#include <stdio.h>
#include "kontaktverzeichnis.h"
int main(){
kontakt_hinzufuegen();
return 0;
}
내 main.c에있다 :
#ifndef KONTAKTVERZEICHNIS_H_
#define KONTAKTVERZEICHNIS_H_
#include "kontaktfunktionen.c"
int kontakt_hinzufuegen();
#endif /* KONTAKTVERZEICHNIS_H_ */
이것은
#include <stdio.h>
kontakt[];
kontakt_hinzufuegen(){
int i = 0;
printf("Bisher sind %i Kontakte angelegt.",kontakt[i]);
kontakt[i++];
}
struct kontaktname{
char* name;
char* vorname;
};
struct kontaktanschrift{
char* strasse;
int hausnummer;
int plz;
char* ort;
char* land;
};
어디에 오류가 kontaktfunktionen.c입니까?
당신은 왜합니까 :'#include "kontaktfunktionen.c"'. 소스 파일이 아니라 헤더가 포함됩니다. – hetepeperfan