title: illegal reference to non-static member
body: <p>I am trying to refer to a cstring <code>mycustompath</code> from a different class from my current class.</p>
  
  <pre><code>CString test = CBar::mycustompath + _T("executables\\IECapt");
  </code></pre>
  
  <p>But I got this error instead:</p>
  
  <blockquote>
    <p>error C2597: illegal reference to non-static member 'CBar::mycustompath'  c:\work\b.cpp   14  </p>
  </blockquote>
  
  <p>How to fix this?</p>