📄 subject_38307.htm
字号:
<p>
序号:38307 发表者:520yl 发表日期:2003-05-02 14:25:43
<br>主题:我写的这个简单的程序~总是找不到错在哪里~请各位帮我看看~指点一下~谢谢了
<br>内容:// my2.cpp : Defines the entry point for the console application.<BR>//编一程序,其中main调用一用户定义函数(以摄氏温度为参数,并返回相应的华氏温度值)。该程序以下面的<BR>//格式要求用户输入摄氏温度值,并显示结果:<BR>//Please enter a Celsius value:20<BR>//20 degrees Celsius is degrees Fahrendheit.<BR>//转换公式为 华氏温度=1.8*摄氏温度*32.0<BR>#include <stdafx.h><BR>#include <iostream.h><BR>using namespace std;<BR>double my1_function(double);<BR>int main()<BR>{<BR> double wen;<BR> cout<<"Please enter a Celsius value:";<BR> cin>>wen>>endl;<BR> double hua;<BR> hua=my1_function(wen);<BR> cout<<hua<<"degrees Celsius is degrees Fahrenheit.\n";<BR><BR> return 0;<BR>}<BR><BR>double my1_function(double a)<BR>{<BR> double a;<BR> return 1.8*a*32.0;<BR>}<BR><BR>vc++6.0提示错误~d:\visual c++\msdev98\myprojects\my2\my2.cpp(4) : fatal error C1083: Cannot open precompiled header file: 'Debug/my2.pch': No such file or directory<BR>Error executing cl.exe.<BR><BR><BR><BR>我刚学习c++请大虾指点~一下~
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:maginn 回复日期:2003-05-02 15:04:19
<br>内容:那个回答了,这个是不是也给我分数阿
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:chathuang 回复日期:2003-05-03 09:43:32
<br>内容:加一个#include "math.h"试试看。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:dongls 回复日期:2003-05-03 10:31:43
<br>内容:程序第一次编译时,应选完全编译,否则会出现这个错误。<BR><BR>选 菜单 -- 编译 -- 重建全部
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:憨豆先生 回复日期:2003-05-03 19:01:47
<br>内容://#include <stdafx.h>/////////////////////////////////////////////<BR>#include <iostream.h><BR>//using namespace std;///////////////////////////////////////////<BR>double my1_function(double);<BR>int main()<BR>{<BR> double wen;<BR> cout<<"Please enter a Celsius value:";<BR> cin>>wen;//>>endl;////////////////////////////////////////<BR> double hua;<BR> hua=my1_function(wen);<BR> cout<<hua<<"degrees Celsius is degrees Fahrenheit.\n";<BR><BR> return 0;<BR>}<BR><BR>double my1_function(double a)<BR>{<BR>// double a;/////////////////////////////////////////<BR> return 1.8*a*32.0;<BR>}<BR>注意//的地方<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:520yl 回复日期:2003-05-04 10:14:15
<br>内容:谢谢各位了~~~我弄清楚了~~谢谢 你们的帮忙<BR><BR>非常感谢~~
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:520yl 回复日期:2003-05-04 10:15:09
<br>内容:以后多多指教我这个刚入门的小弟~~<BR>谢谢各位
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -