title: The purpose of stdafx.h (And: Why doesn't this work?)
body: <p>I am working on a project that has a vendor-provided API. I've made a class that uses that API in my project and I've included the vendors header file in my <code>stdafx.h</code> file. Things would not compile.</p>
  
  <p>I then put the <code>#include</code> directly into my class' header file and now things compile (And yes, my class includes <code>stdafx.h</code> so that isn't the reason.</p>
  
  <p>Do any of you have any guesses as to why it wouldn't compile the first time around? This isn't a project-stopper by far but I'd prefer if I could keep all vendor API files in stdafx.h where they belong.</p>
  
  <p>EDIT: Problem solved, I'd created a cyclic dependency by forgetting to #ifndef a header file and then including them in the wrong order. I feel like an idiot.</p>