我是編程新手,拿起C語言作爲我的第一個計算機語言。我正在做一個示例轉換程序,當我編譯代碼時,出現以下錯誤。C程序編譯錯誤
這是什麼意思,我該如何解決?
謝謝!
1>------ Build started: Project: ConversionProgram, Configuration: Debug Win32 ------
1>Build started 24-07-2012 20:58:37.
1>InitializeBuildStatus:
1> Touching "Debug\ExcerciseProgram1.unsuccessfulbuild".
1>ClCompile:
1> conversion.cpp
1>c:\my documents\visual studio 2010\projects\excerciseprogram1\excerciseprogram1\question2.cpp(12): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(304) : see declaration of 'scanf'
1>c:\my documents\visual studio 2010\projects\excerciseprogram1\excerciseprogram1\question2.cpp(18): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>c:\my documents\visual studio 2010\projects\excerciseprogram1\excerciseprogram1\question2.cpp(32): error C2857: '#include' statement specified with the /YcStdAfx.h command-line option was not found in the source file
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.1
我使用VB 2010年定爲我的IDE
您在'question2.cpp'文件(C++源文件,不是C文件!)的第12,18,32行有錯誤。沒有這個文件,我們無法幫助你。 – 2012-07-25 08:52:12
你可以發佈你的C代碼嗎? – 2012-07-25 08:52:29
我相信你不應該選擇* C *(或* C++ *)作爲你的* first *編程語言。選擇* Ocaml *,* Scheme *,* Python *或* Common Lisp *會更多地瞭解您。一旦你學會了用高級語言編程一點點,學習* C *就不那麼困難了。 – 2012-07-25 08:55:28