title: Forward declaration of struct
body: <p>I have a header file a.h and inside that I have declared one structure. The name of that structure is <code>file</code>. Inside <code>file</code> I have 3 members: a, b, c. In a.cpp I have implemented that structure and assigned some values to that structure variable.</p>
  
  <p>Now I have another file b.h. Inside it I have a forward declaration of the structure <code>file</code>. Until this point if I compile it's not showing an error but when I am going to access the variable present in that structure through that b.cpp class it will give an error like "undefined struct".</p>
  
  <p>What am I doing wrong?</p>