Put header files after #include "stdafx.h"
#include "stdafx.h"
#include <iostream>
#include <fstream>
stdafx.h
must be the first included file, this is Microsoft specific rule.
Visual C++ will not compile anything before the #include "stdafx.h" in the source file, unless the compile option /Yu'stdafx.h' is unchecked (by default) 1