title: C++ power consumption cant be calculated
body: <p>So I am very new to <code>C++</code> but trying to learn. I have been trying to deal with this problem for over 5 hours and cant seem to fix my issue.
  At line 24:</p>
  <blockquote>
  <p>float Pris=kWh*elpris; // total pris</p>
  </blockquote>
  <p>I get this error:</p>
  <blockquote>
  <p>Invalid operands to binary expression ('float (*)(float, float)' and 'float')</p>
  </blockquote>
  <p>I am trying to multiply kWh with pris (price) so get a kWh price...
  What am i missing or doing wrong?
  Thank you in advance</p>
  <p>[![enter image description here][1]][1]</p>
  <p>Edit here is the code:</p>
  <pre><code>
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  
  float kWh(float Watt, float Tid) {
      return Watt / 1000 * Tid;
  
  }
  int main() {
  
      float elpris; //elpris pr Kwh
      float Watt; //Watt enheden bruger
      float Tid; //Antal timer enheden bliver brugt
      float pris;
      
      //------*Here Error occurred*-------------------- 
      float Pris=kWh*elpris; // total pris
      
      cout &lt;&lt; &quot;Skriv din endheds Watt &quot;;
      cin &gt;&gt; Watt;
      
      cout &lt;&lt; &quot;skriv din forbrugstid i timer &quot;;
      cin &gt;&gt; Tid;
      
      cout &lt;&lt; &quot;skriv din elpris pr kWh i dkk: &quot;;
      cin &gt;&gt; elpris;
      
      cout &lt;&lt; &quot;Forbruget er &quot; &lt;&lt;kWh(Watt, Tid); cout &lt;&lt; &quot;kWh&quot; &lt;&lt;endl;
      cout &lt;&lt; &quot;din pris er: &quot; &lt;&lt;Pris;
  }
  
  </code></pre>