title: How to fix "incompatible pointer type" error in C?
body: <p>I have homework about function pointers and implement inheritance in C. I got "incompatible pointer type" error about Aralik, VerilenlerArasindan and Harfler. What's problem?</p>
  
  <blockquote>
    <p>RastgeleKarakter.h</p>
  </blockquote>
  
  <pre><code>    struct RASTGELEKARAKTER{
          Random ran;
          char (*Harf)(struct RASTGELEKARAKTER*);
          char* (*Harfler)(struct RASTGELEKARAKTER*);
          char* (*Aralik)(struct RASTGELEKARAKTER*);
          char* (*VerilenlerArasindan)(struct RASTGELEKARAKTER*);
          char* (*Cumle)(struct RASTGELEKARAKTER*);
          void (*YokEt)(struct RASTGELEKARAKTER*);
      };
  
      typedef struct RASTGELEKARAKTER* RastgeleKarakter;
  
      RastgeleKarakter RastegeleKarakterOlustur();
      char RandomHarf(RastgeleKarakter);
      char* RandomHarfler(RastgeleKarakter,unsigned);
      char* RandomAralik(RastgeleKarakter,unsigned,char,char);
      char* RandomVerilenlerArasindan(RastgeleKarakter,unsigned,char*);
      char* RandomCumle(RastgeleKarakter);
      void RastgeleKarakterYokEt(RastgeleKarakter);
  </code></pre>
  
  <blockquote>
    <p>RastgeleKarakter.c</p>
  </blockquote>
  
  <pre><code>RastgeleKarakter RastegeleKarakterOlustur(){
  
      RastgeleKarakter karakter;
      karakter = (RastgeleKarakter)malloc(sizeof(struct RASTGELEKARAKTER));
      karakter-&gt;ran = RandomOlustur();
      karakter-&gt;Harf = &amp;RandomHarf;
      karakter-&gt;Harfler = &amp;RandomHarfler;
      karakter-&gt;Aralik = &amp;RandomAralik;
      karakter-&gt;VerilenlerArasindan = &amp;RandomVerilenlerArasindan;
      karakter-&gt;Cumle = &amp;RandomCumle;
      karakter-&gt;YokEt = &amp;RastgeleKarakterYokEt;
      return karakter;
  }
  </code></pre>