主题:帮忙解决问题
帮忙解决问题
#include<iostream>
#include<conio>
using namespace std;
class Price
{
public:
float rm;
Price()
{
}
Price(float r)
{
rm=r;
}
Price operator + (Price);
void accept()
{
cout<<"\nEnter price:RM ";
cin>>rm;
}
void display()
{
cout<<"\n";
cout<<"Price:RM "<<rm;
cout<<"\n";
}
void total()
{
cout<<"\n";
cout<<"Total price:RM "<<rm;
cout<<"\n";
}
};
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/exxer 5.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
exxer 5.exe - 2 error(s), 0 warning(s)
#include<iostream>
#include<conio>
using namespace std;
class Price
{
public:
float rm;
Price()
{
}
Price(float r)
{
rm=r;
}
Price operator + (Price);
void accept()
{
cout<<"\nEnter price:RM ";
cin>>rm;
}
void display()
{
cout<<"\n";
cout<<"Price:RM "<<rm;
cout<<"\n";
}
void total()
{
cout<<"\n";
cout<<"Total price:RM "<<rm;
cout<<"\n";
}
};
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/exxer 5.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
exxer 5.exe - 2 error(s), 0 warning(s)