title: Pointer to static member variable
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/272900/c-undefined-reference-to-static-class-member">C++: undefined reference to static class member</a>  </p>
  </blockquote>
  
  
  
  <p>The following C++ code compiles well (using <code>g++ -c</code>) but it doesn't link giving the error: <code>undefined reference to</code>Abc::X'`</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class Abc {
  
  public:
      const static int X = 99;
  };
  
  int main()
  {
      Abc a1;
      cout &lt;&lt; &amp;(Abc::X) &lt;&lt; endl;
  }
  </code></pre>
  
  <p>I want to know why this is not allowed?</p>