title: Create interface to my C++ static library
body: <p>Suppose I have 2 files in my project: "code.h" and "readData.cpp".  The code.h file has my class interface (and some of the member function definitions), and the readData.cpp file has the definition of one of my class's private member functions.</p>
  
  <p>Suppose this is the contents of my code.h file:</p>
  
  <pre><code>Class MyClass {
  public:
      MyClass() { readData() };
      double sample();
  
  private:
      std::vector&lt;double&gt; data;
      void readData();
      void foo();
  };
  
  double MyClass::sample() {
      // ...
  }
  
  void MyClass::foo() {
      // ...
  }
  </code></pre>
  
  <p>Suppose this is the contents of my readData.cpp file:</p>
  
  <pre><code>#include "code.h"
  
  void MyClass::readData() {
      data.push_back(1.3083);
      data.push_back(83.24);
      // ...
  }
  </code></pre>
  
  <p>Now, after compiling and producing the object file "readData.o", I create a library using the code:</p>
  
  <pre><code>ar rvs myLib.a readData.o
  </code></pre>
  
  <p>OK, so far so good.  But here's where my question comes.  I would like to distribute this myLib.a library and <strong>only</strong> permit other users to see something like the following interface:</p>
  
  <pre><code>Class MyClass {
      double sample();
  };
  </code></pre>
  
  <p>How can I do that?</p>