好暈,為什么這個程式我打的沒問題就是報錯運行不出來呢?
1>------ Build started: Project: unit 1, Configuration: Debug Win32 ------
1>Build started 2020/10/31 12:26:48.
1>InitializeBuildStatus:
1> Touching "Debug\unit 1.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> unit 1.cpp
1>c:\users\86188\desktop\unit 1\unit 1\unit 1.cpp(5): warning C4627: '#include <math.h>': skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\86188\desktop\unit 1\unit 1\unit 1.cpp(41): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.45
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

uj5u.com熱心網友回復:
1>c:\users\86188\desktop\unit 1\unit 1\unit 1.cpp(41): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?提示你沒有包含頭檔案"StdAfx.h"'。在#include <math.h> 后面插入一行:#include<StdAfx.h>。
uj5u.com熱心網友回復:
新建專案時,把后綴名改成unit 1.c轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/197566.html
標籤:C++ 語言
上一篇:求解決!急!
