主题:求助:这是什么错误
#include <iostream>
using namespace std;
class time
{
public:
int hour;
int minute;
int second;
};
int main()
{
void set_time(time&);
void show_time(time&);
time t;
set_time(t);
show_time(t);
return 0;
}
void set_time(time&t)
{
cin>>t.hour>>t.minute>>t.second ;
}
void shoe_time(time&t)
{
cout<<t.hour<<":"<<t.minute<<":"<<t.second;
}
Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl show_time(class time &)" (?show_time@@YAXAAVtime@@@Z)
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Cpp1.exe - 2 error(s), 0 warning(s)
using namespace std;
class time
{
public:
int hour;
int minute;
int second;
};
int main()
{
void set_time(time&);
void show_time(time&);
time t;
set_time(t);
show_time(t);
return 0;
}
void set_time(time&t)
{
cin>>t.hour>>t.minute>>t.second ;
}
void shoe_time(time&t)
{
cout<<t.hour<<":"<<t.minute<<":"<<t.second;
}
Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl show_time(class time &)" (?show_time@@YAXAAVtime@@@Z)
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Cpp1.exe - 2 error(s), 0 warning(s)