I have MyClass.cpp and MyClass.h files. Since MyClass.cpp has #include "MyClass.h" I put stdafx.h to  MyClass.h. During compile I got error:
unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
Why? If MyClass.cpp includes MyClass.h it should include all lines of MyClass.h and these lines contain stdafx.h.
 
     
     
    