title: getting error when using struct and pointer
body: <p>I'm testing something that we do in school. I have a struct <code>MyStruct</code> and two pointers, but when I want to work with the pointer I get this error for both pointers:</p>
  
  <blockquote>
    <p>uninitialized local variable 'p' used</p>
  </blockquote>
  
  <pre><code>struct MyStruct {
      int id;
      double value;
  };
  
  MyStruct *p, *q;
  double z = 10;
  double y = 16.17;
  (*p).value = z;
  (*q).value = y;
  cout &lt;&lt; (*p).value &lt;&lt; " " &lt;&lt; (*q).value &lt;&lt; endl;
  </code></pre>