title: const string vs. #define
body: <p>i need to share some strings in my c++ program. should i use #define or const string? thanks</p>
  
  <p>mystring1.h  </p>
  
  <pre><code>#define str1 "str1"
  #define str2 "str2"    
  </code></pre>
  
  <p>Or<br>
  mystring2.h  </p>
  
  <pre><code>extern const string str1;  
  extern const string str2;  
  </code></pre>
  
  <p>mystring.cpp  </p>
  
  <pre><code>const string str1 = "str1";  
  const string str2 = "str2";
  </code></pre>