title: Why does C++ think 8^1/3 = 1?
body: <p>I was testing the pow() function in c++  </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cmath&gt;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; pow(8,(1/3)) &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>For some reason, this returns 1. Why does this happen?</p>