Error C1083: Cannot open include file: 'stdafx.h'

前端 未结 6 1618
小鲜肉
小鲜肉 2020-12-03 14:40

When I compiled this program (from C++ Programming Language 4th edition):

main.cpp

#include 
#include 
#incl         


        
6条回答
  •  借酒劲吻你
    2020-12-03 14:50

    There are two solutions for it.

    Solution number one: 1.Recreate the project. While creating a project ensure that precompiled header is checked(Application settings... *** Do not check empty project)

    Solution Number two: 1.Create stdafx.h and stdafx.cpp in your project 2 Right click on project -> properties -> C/C++ -> Precompiled Headers 3.select precompiled header to create(/Yc) 4.Rebuild the solution

    Drop me a message if you encounter any issue.

提交回复
热议问题