title: How do I define string constants in C++?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1563897/c-static-constant-string-class-member">C++ static constant string (class member)</a><br>
    <a href="https://stackoverflow.com/questions/2888805/static-const-c-class-member-initialized-gives-a-duplicate-symbol-error-when-lin">static const C++ class member initialized gives a duplicate symbol error when linking</a>  </p>
  </blockquote>
  
  
  
  <p>My experience with C++ pre-dated the addition of the string class, so I'm starting over in some ways.</p>
  
  <p>I'm defining my header file for my class and want to create a static constant for a url. I'm attempting this by doing as follows:</p>
  
  <pre><code>#include &lt;string&gt;
  class MainController{
  private:
      static const std::string SOME_URL;
  }
  
  const std::string MainController::SOME_URL = "www.google.com";
  </code></pre>
  
  <p>But this give me a duplicate definition during link.</p>
  
  <p>How can I accomplish this?</p>