title: Warning: initialization makes pointer from integer without a cast in C
body: <p>I am getting the warning: initialization makes pointer from integer without a cast in C. What is a cast? What should I do?</p>
  
  <pre><code>void UpdateElement(Console* console)
  {
      DynamicVector* CostList=getAllCosts(console-&gt;ctrl);
      int i,n;
      printf("Give the position of the element you want to delete:");
      scanf("%d",&amp;n);
      for(i=n-1;i&lt;getLen(CostList);i++)
      {
          Cost* c=(Cost*)getElementAtPosition(CostList,i);
          Cost* c2=AddCost(console); **//here I get the warning**
          update_an_element(console-&gt;ctrl,c,c2,i);
      }
  }
  
  Console* initConsole(Controller* ctrl)
  {
      Console* console=(Console*)malloc(sizeof(Console));
      console-&gt;ctrl=ctrl;
      return console;
  }
  
  int createCost(Controller* ctrl, char* day, char* type, int sum)
  {
      Cost* c=initCost(day,type,sum);
      save(ctrl-&gt;repo,c);
      return c; **//now here I get the warning**
  
  }
  </code></pre>