title: Wind Chill Factor
body: <p>Trying to write the wind chill factor equation in C++, and am having trouble with my equation and return value.</p>
  
  <p>this is the function where the error comes up.</p>
  
  <pre><code>void eqfunction(int temperature, int windspeed){
      int windindex;
      windindex = 35.74 + (0.6215 * temperature);
      windindex = windindex - (35.75 * windspeed^0.16);
      windindex = windindex + ((0.4275 * temperature)*windspeed^0.16);
      return windindex;
  }
  </code></pre>
  
  <p><strong>Edit</strong>: (Ed.) after fixing the function following advice given in answers, new errors crop up:</p>
  
  <pre><code>float windChillFactor(float temperature, float windspeed){
      float windindex = 35.74f + 0.6215f * temperature;
      windindex -= 35.75f * std::pow(windspeed, 0.16f);
      windindex += 0.4275f * temperature * std::pow(windspeed, 0.16f);
      return windindex;
  }
  </code></pre>
  
  <p>I know there are two things I'm doing wrong I just don't know how to fix them. Obviously its the "^" and my return value. how would I create a square from 0.16 for windspeed?
  And how would I create a correct windindex return value?</p>
  
  <p>These are my errors</p>
  
  <pre><code>1&gt;c:\users\ryan\desktop\final.cpp\final.cpp\final project.cpp(18):
    warning C4244: 'argument' : conversion from 'int' to 'float',
    possible loss of data
  1&gt;c:\users\ryan\desktop\final.cpp\final.cpp\final project.cpp(18):
    warning C4244: 'argument' : conversion from 'int' to 'float',
    possible loss of data
  1&gt;c:\users\ryan\desktop\final.cpp\final.cpp\final project.cpp(18):
    error C2440: '=' : cannot convert from 'void' to 'int'
  1&gt;          Expressions of type void cannot be converted to other types
  1&gt;c:\users\ryan\desktop\final.cpp\final.cpp\final project.cpp(22):
    error C2556: 'float eqfunction(float,float)' : overloaded function differs
    only by return type from 'void eqfunction(float,float)'
  1&gt;          c:\users\ryan\desktop\final.cpp\final.cpp\final project.cpp(6) :
              see declaration of 'eqfunction'
  1&gt;c:\users\ryan\desktop\final.cpp\final.cpp\final project.cpp(22):
    error C2371: 'eqfunction' : redefinition; different basic types
  1&gt;          c:\users\ryan\desktop\final.cpp\final.cpp\final project.cpp(6) :
              see declaration of 'eqfunction'
  </code></pre>