title: initial value of reference to non-const must be an lvalue
body: <p>I'm trying to send value into function using reference pointer but it gave me a completely non-obvious error</p>
  <pre><code>#include &quot;stdafx.h&quot;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  void test(float *&amp;x){
      
      *x = 1000;
  }
  
  int main(){
      float nKByte = 100.0;
      test(&amp;nKByte);
      cout &lt;&lt; nKByte &lt;&lt; &quot; megabytes&quot; &lt;&lt; endl;
      cin.get();
  }
  </code></pre>
  <blockquote>
  <p>Error : initial value of reference to non-const must be an lvalue</p>
  </blockquote>
  <p>I have no idea what I must do to repair above code, can someone give me some ideas on how to fix that code?</p>