title: Warning passing `double' for converting 2 of `void moveto(int, int)'
body: <p>I got lot of those wanring in this program:
  Cannot figure out why, please help.
  The program works, it shows the graphics i need but i got those warnings starting with lines where is moveto and lineto
  Here is the full program:</p>
  
  <pre><code>int main()
  {
  
      int Um=220, f=5, R=5;
      double XL=10, XC=5, t, Im, Z, fi; // jaunie mainīgie
      int s=1000, n=0;  // jaunie mainīgie datu masīvam - s-max.izmērs, n-aktuāls datu skaits
      double ue[s],it[s],ur[s],ul[s],uc[s]; //datu masīvi
  
      Z=sqrt(R*R+pow(XL-XC,2));   //Z aprēķins
      Im = Um/Z;                  //Im aprēķins
      fi = asin((XL-XC)/Z);       //fi aprēķins
  
      //Ķēdes modelēšanas cikls
      for (t=0;t&lt;=2;t+=0.002) //cikls mainot t no 0 lidz 2
      {
      ue[n] = Um*sin(2*M_PI*f*t);         //ue (avota spriegums) datu ieraksts masīvā
      it[n] = Im*sin(2*M_PI*f*t+fi);      //it (strāva) datu ieraksts masīvā
      ur[n] = Im*R*sin(2*M_PI*f*t+fi);    //ur (rez.spriegums) datu ieraksts masīvā
      ul[n] = Im*XL*sin(2*M_PI*f*t+fi+M_PI/2);    //ul (spol.spriegums) datu ieraksts masīvā
      uc[n] = Im*XC*sin(2*M_PI*f*t+fi-M_PI/2);    //uc (kond.spriegums) datu ieraksts masīvā  
      n++;        //mērījumu skaita palielināšana 
      }
  
      for (int i=0; i&lt;5; i++) 
          cout &lt;&lt; "i = " &lt;&lt; i &lt;&lt; " " &lt;&lt; ue[i] &lt;&lt; " " &lt;&lt; it[i] &lt;&lt; " " &lt;&lt;  ur[i] &lt;&lt; " " &lt;&lt; ul[i] &lt;&lt; " " &lt;&lt; uc[i] &lt;&lt; endl;
  
      initwindow (1000,500,"Grafiks");    
  
      //Grafiku izvades cikls
      for (int x=0; x&lt;n-1; x++)
      {
          //ue grafika izvades komandas
          setcolor(10);               //krāsa         
          moveto(x,50-ue[x]*0.1);     //kursora ievietošana
          lineto(x+1,50-ue[x+1]*0.1); //līnijas zīmēšana
          //ur grafika izvades komandas
          setcolor(11);
          moveto(x,150-ur[x]*0.1);
          lineto(x+1,150-ur[x+1]*0.1);
          //ul grafika izvades komandas
          setcolor(12);
          moveto(x,250-ul[x]*0.1);
          lineto(x+1,250-ul[x+1]*0.1);
          //uc grafika izvades komandas
          setcolor(13);
          moveto(x,350-uc[x]*0.1);
          lineto(x+1,350-uc[x+1]*0.1);        
          //it 4 grafiku izvades cikls
          for (int i=50; i&lt;=350; i+=100)
          {
          //it grafika izvades komadas            
          setcolor(14);
          moveto(x,i-it[x]);
          lineto(x+1,i-it[x+1]);          
          }                               
      }   
      while (!kbhit());
      closegraph();
  }
  </code></pre>