注册 登录
编程论坛 C++教室

vc6.0的问题 大神过来帮帮我

新人学习 发布于 2017-12-09 21:52, 1221 次点击
-------------------Configuration: dm_02编程练习第六题 - Win32 Debug--------------------
Linking...
dm_02编程练习第六题.obj : error LNK2001: unresolved external symbol "double __cdecl tianwen(double)" (?tianwen@@YANN@Z)
Debug/dm_02编程练习第六题.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.


3 回复
#2
新人学习2017-12-09 21:57
#include<iostream>
using namespace std;

double tianwen(double);
void main()
{
    double a;
    double b;
   
    cout<<"Enter the number of light years:";
    cin>>a;
    b=tianwen(a);
    cout<<a<<" light years = "<<b<<" astronomical units."<<endl;


    system("pause");
}


double tiaowen(double x)
{
    return 63240*x;
}
#3
yangfrancis2017-12-10 11:25
你想写tiaowen还是tianwen?
#4
新人学习2017-12-10 14:28
呵呵~~~谢谢版主...
1