title: Writing a C++ wrapper for a C library
body: <p>I have a legacy C library, written in an OO type form. Typical functions are like:</p>
  
  <pre><code>LIB *lib_new();
  void lib_free(LIB *lib);
  int lib_add_option(LIB *lib, int flags);
  void lib_change_name(LIB *lib, char *name);
  </code></pre>
  
  <p>I'd like to use this library in my C++ program, so I'm thinking a C++ wrapper is required.
  The above would all seem to map to something like:</p>
  
  <pre><code>class LIB
  {
      public:
           LIB();
           ~LIB();
           int add_option(int flags);
           void change_name(char *name);
  ...
  };
  </code></pre>
  
  <p>I've never written a C++ wrapper round C before, and can't find much advice about it. Is this a good/typical/sensible approach to creating a C++/C wrapper?</p>