title: Why do I get "Invalid conversion from "void *" to "int**" error?
body: <p>my code shows this warnings when compiling with "g++ -Wall -pedantic -Wno-long-long -c main.c". I have to compile in this mode, becouse its a homework and we have an application that corrects them and it uses this compile mode.</p>
  
  <ol>
  <li>Error: invalid conversion from "void" to "int** " [-fpermissive]</li>
  <li>Error: invalid conversion from "void" to "int* " [-fpermissive]</li>
  <li>Error: invalid conversion from "void" to "main(int, char*<em>)::VYSLEDEK</em>" [-fpermissive]</li>
  </ol>
  
  <p>the same errors continue as i realloc quite a lot in my program. I tried to change almost everything in that realloc, it is still the same.</p>
  
  <p>Parts of the code :</p>
  
  <pre><code>    struct VYSLEDEK
  {
      int sirka;
      int vyska;
      int zacatek_x;
      int zacatek_y;
      int soucet;
  } *vysledek;
      int **matice,**soucty;
  
      .....       
  
      matice=(int**)malloc(1*sizeof(int*));
      matice[0]=(int*)malloc(1*sizeof(int));
      soucty=(int**)malloc(1*sizeof(int*));
      soucty[0]=(int*)malloc(1*sizeof(int));
  
      .....
  
  1.      matice=realloc(matice,naalokovano*2*sizeof(int*));
  2.      soucty=realloc(soucty,naalokovano*2*sizeof(int*));
  
      .....
  
          for (i=0;i&lt;(naalokovano*2);i++)
          {
  3.            matice[i]=realloc(matice[i],sizeof(int));
  4.            soucty[i]=realloc(soucty[i],sizeof(int*));
          };
  
      .....
  
  5.      vysledek=realloc(vysledek,vysledku*sizeof(struct VYSLEDEK*));
  </code></pre>
  
  <p>Thank you for your help.</p>