title: truncation from double to float?
body: <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main(void)
  {
      float haha[2];
      float (&amp;ptr)[2] = haha;
      ptr[0] = 0.54;
      ptr[1] = 0.65;
  
      cout &lt;&lt; haha[0] &lt;&lt; '\n' &lt;&lt; haha[1];
      system("pause");
      return 0;
  }
  </code></pre>
  
  <p>I am currently learning complicated array declarations using primer C++ and in my code here i get warnings saying <code>Warning  C4305   '=': truncation from 'double' to 'float'    Array</code> for both <code>ptr[0]</code> and <code>ptr[1]</code> for some reason but i don't see doubles anywhere but when i modify the code to </p>
  
  <pre><code>ptr[0] = (float)0.54;
  ptr[1] = (float)0.65;
  </code></pre>
  
  <p>i seem to have no warnings can anyone explain why? Thank you in advance!</p>