title: Converting to const in C++
body: <p>C++, OS X, Carbon API.</p>
  
  <p>I need to pass in a <code>const FSSpec</code> to a method <code>FSpOpenDF</code></p>
  
  <p>I have as follows:</p>
  
  <pre><code>const FSSpec fsSpec = fFileSpec.GetFSSpec();/* is declared as FSSpec GetFSSpec() const; */
  
  err = ::FSpOpenDF(fsSpec, 1, &amp;refNumber);
  </code></pre>
  
  <p>But I get an error that is:</p>
  
  <pre><code>error: cannot convert 'const FSSpec' to 'const FSSpec*' for argument '1' to 'OSErr FSpOpenDF(const FSSpec*, SInt8, short int*)'
  </code></pre>
  
  <p>I have tried defining as: </p>
  
  <pre><code>const FSSpec*  fsSpec = fFileSpec.GetFSSpec();  
  </code></pre>
  
  <p>and that doesn't help. So Obviously I am confused.</p>
  
  <p>Can anyone explain the concept I am missing?</p>