Я учил себя C несколько месяцев, когда у меня есть время, и я столкнулся с проблемой, я не уверен, как ее исправить.
В частности, когда я пытаюсь скомпилировать это с помощью gccЯ получаю:
RastgeleKarakter.c файлы
RastgeleKarakter RastgeleKarakterOlustur(){
RastgeleKarakter this;
this=(RastgeleKarakter)malloc(sizeof(struct RASTGELEKARAKTER));
this->rnd=RandomKur();
this->TekKarakter=&TekKarakter;
this->FazlaKarakter=&FazlaKarakter;
this->AraKarakter=&AraKarakter;
this->Arama=&Arama;
this->BelirlenenKarakter=&BelirlenenKarakter;
return this;
}
void TekKarakter(){
int mod;
mod = (saniye()%52);
printf(Dizi[mod]);
printf('\n');
}
RastgeleKarakter.h файлы
struct RASTGELEKARAKTER{
Random rnd;
char (*RastgeleKarakterOlustur)(struct RASTGELEKARAKTER*);
char (*TekKarakter)(struct RASTGELEKARAKTER*);
char* (*FazlaKarakter)(struct RASTGELEKARAKTER*, int);
char* (*AraKarakter)(struct RASTGELEKARAKTER*, char, char, int);
char (*Arama)(struct RASTGELEKARAKTER*, char[], char);
char* (*BelirlenenKarakter)(struct RASTGELEKARAKTER*, char, char, char, char, char, char, int);
};
typedef struct RASTGELEKARAKTER* RastgeleKarakter;
char RastgeleKarakterOlustur(const RastgeleKarakter);
char TekKarakter(const RastgeleKarakter);
char* FazlaKarakter(const RastgeleKarakter, int);
char* AraKarakter(const RastgeleKarakter, char, char, int);
char Arama(const RastgeleKarakter, char[], char);
char* BelirlenenKarakter(const RastgeleKarakter, char, char, char, char, char, char, int);
./src/RastgeleKarakter.c:26:21: error: conflicting types for 'RastgeleKarakterOlustur'
RastgeleKarakter RastgeleKarakterOlustur()
In file included from ./src/RastgeleKarakter.c:14:0:
./include/RastgeleKarakter.h:35:7: note: previous declaration of 'RastgeleKarakterOlustur' was here
char RastgeleKarakterOlustur(const RastgeleKarakter);
./src/RastgeleKarakter.c:38:9: error: conflicting types for 'TekKarakter'
void TekKarakter()
In file included from ./src/RastgeleKarakter.c:14:0:
./include/RastgeleKarakter.h:36:7: note: previous declaration of 'TekKarakter' was here
char TekKarakter(const RastgeleKarakter);
./src/RastgeleKarakter.c:49:9: error: conflicting types for 'FazlaKarakter'
void FazlaKarakter(int Sayi)
In file included from ./src/RastgeleKarakter.c:14:0:
./include/RastgeleKarakter.h:37:8: note: previous declaration of 'FazlaKarakter' was here
char* FazlaKarakter(const RastgeleKarakter, int);
./src/RastgeleKarakter.c:62:9: error: conflicting types for 'AraKarakter'
void AraKarakter(char a, char b, int Sayi)