title: 'initializing': cannot convert from 'void *' to 'int*'
body: <p>When I try to run the following code, I get this error:</p>
  <pre><code>'initializing': cannot convert from 'void *' to 'int *' 
  </code></pre>
  <p>I'd like to return an array of casual numbers from 1 to 10 from the function but I can't figure out how to do it, can you help me?
  The IDE underlines 'malloc'.</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;memory.h&gt;
  #include &lt;math.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;time.h&gt;
  
  int* casuali(int n);
  
  int main()
  {
      int n = 10;
  
      int* arrCasuali = casuali(n);
  
      for (int i = 0; i &lt; n; i++)
      {
          printf(&quot;%d&quot;, arrCasuali[i]);
      }
  }
  
  int* casuali(int n)
  {
      int* arrCasuali = malloc(sizeof(int) * n);
      srand(time(NULL));
  
      for (int i = 0; i &lt; n; i++)
      {
          arrCasuali[i] = rand() % 10 + 1;
      }
  
      return arrCasuali;
  }
  </code></pre>