title: Trouble using opaque pointers in Objective C++
body: <p>The answer to <a href="https://stackoverflow.com/questions/2262011/adding-c-object-to-objective-c-class/2262395">this quesion</a> explains that opaque pointers are a good way to include C++ member variables in an Objective C++ header. I'm getting compile errors when trying to follow the example. Here's the relevant code from my header, with the corresponding compiler errors shown as comments:</p>
  
  <pre><code>struct ADSR_opaque; // error: forward declaration of 'struct ADSR_opaque'
  
  @interface LoopyPulser : NSObject{
  
      float _pulseRate;
      UInt32 tickInterval;
      UInt32 step;
      InMemoryAudioFile * audioFilePlayer;
      ADSR_opaque* env; //  error: expected specifier-qualifier-list before 'ADSR_opaque'
      Pattern * pattern;
      float loopLengthRatio;
      float volume;
  }
  </code></pre>
  
  <p>Is there something simple I'm doing wrong here?</p>