title: Why can I declare an array in a header file, but not a pointer?
body: <p>I have a problem with my Consts.hpp file:</p>
  
  <pre><code>#pragma once
  #include &lt;stdafx.h&gt;
  
  namespace consts {
      const GLchar* TEXTURE_DIR = "../../blabla/"; // doesn't work
      const GLchar TEXTURE_DIR[14] = "../../blabla/"; // works
  };
  </code></pre>
  
  <p>This file is added to the stdafx.h file. ColladaReader.cpp is the file where I access TEXTURE_DIR.
  Why does the pointer not work in the namespace? When accessing the constant I get this error:</p>
  
  <pre><code> Error  5   error LNK2005: "char const * const consts::TEXTURE_DIR" (?TEXTURE_DIR@consts@@3PBDB) already defined in ColladaReader.obj   D:\Privat\code\openglearn\projects\ColladaReader\stdafx.obj
  </code></pre>