title: What errors do following code have?
body: <p>I am still a beginner in C++, and I am supposed to find the errors in the following code.</p>
  
  <pre><code>1 class Thing
  2 {
  3    public:
  4       char c;
  5       int *p;
  6       float&amp; f;
  7       Thing(char ch, float x) { c = ch; p = &amp;x; f = x; }
  9 };
  </code></pre>
  
  <p>I understand that in the sixth line there is an error: reference f need to be initialized. But I am confused about the seventh line. It looks like a constructor, but I cannot make sure p = &x; is correct? Also, If I want to correct the error of the reference initialization, how can I do it? </p>