visual studio - Why following function cant be called with given argument list? -


 void conver(double&, int&);  private: system::void cb1_selectedindexchanged(system::object^  sender, system::eventargs^  e) {           a=1;          if ((a==1)&&(b2==1))          {if(cb1->text=="celsius")              {                  input=system::convert::todouble(cel->text);                  if (cb2->text=="celsius")                  {                      choice=1;                      conver(input,choice);                  }                   if(cb2->text=="fahrenheit")                  }             }      } 

i getting following error:

error: function "project3::myform::conver" cannot called given argument list. argument types are: (double, int)

image

i don't understand means. can't pass arguments reference in visual c++?

you passing actual number - not variable - reference. cannot pass in numbers reference because numbers not have addresses assigned in registry (memory). have use variable.

you can example:

int myfirstnumber = 1; int mysecondnumber = 1;  conver(myfirstnumber, mysecondnumber); 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -