title: How to use a header file without a cpp file
body: <p>I am a java developer, but I have had to learn C++ recently and I am confused about some things. What I would like to do is create a 'global' header file, which has a list of #define variables which will be constant throughout the suite I am creating. I created the header file, and I added some variables</p>
  
  <pre><code>#ifndef CONSTANTS_H
  #define CONSTANTS_H
  
  #define SM_START            1001;
  #define SM_PAUSE            1002;
  #define SM_STOP             1003;
  #define SM_SAVE             1004;
  #define SM_DISCARD          1005;
  #define SM_SETUP            1007;
  
  
  #endif // CONSTANTS_H
  </code></pre>
  
  <p>My problem is that I can't access these...</p>
  
  <p>I have included the header file where I need it, but there is no way for me to access the constants inside of it. Do I <strong>Have</strong> to have a .cpp file? is there a way for me to access the constant variables?</p>