title: How to call a function from a header file
body: <p>How do you call a function from a source file from a header file?</p>
  
  <p>//h.h</p>
  
  <pre><code>extern string pic;
  class takePic
  {
  public:
      void warPic();
      void artPic();
      void fatePic();
      void painPic();
      void noPic();
  };
  </code></pre>
  
  <p>// second part of the same header where it calls the function
      takePic picture;</p>
  
  <pre><code>void pictureType()
  {
      if (pic == "war")
      {
          picture.warPic();
      }
      else if (pic == "fate")
      {
          picture.fatePic();
      }
      else if (pic == "pain")
      {
          picture.painPic();
      }
      else if (pic == "art")
      {
          picture.artPic();
      }
      else
      {
          picture.noPic();
      }
  }
  </code></pre>
  
  <p>When I do this it says that the linker is not working.
  This is the error linker command failed with exit code 1.</p>