#include
using namespace std;
class Clock
{
public:
void SetTime(int NewH=0,int NewM=0,int NewS=0);
void ShowTime();
private:
int Hour,Minute,Second;
};
void Clock::SetTime(int NewH,int NewM,int NewS)
{
Hour=NewH;
Minute=NewM;
Second=NewS;
}
inline void Clock::ShowTime()
{
cout<
void main()
{
Clock myClock;
cout<<"First time set and output:"<
myClock.ShowTime();
cout<<"Second time set and output:"<
myClock.ShowTime();
}
出错提示:
--------------------Configuration: shizhong - Win32 Debug--------------------
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/shizhong.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
shizhong.exe - 1 error(s), 0 warning(s)
麻烦各位大哥帮我看看是哪出问题了。