stdafx.h is only required if you have specified "Use precompiled headers". If you don't want to include stdafx.h, uncheck that option. Project - Settings - C/C++, you'll find it somewhere under there.