错误warning C4761:integral size mismatch in argument; conversion supplied;怎么修改?错误程序:#includeusing namespace std;class SimpleCircle{public:\x05SimpleCircle(int *a)\x05{\x05\x05itsRadius=a;\x05}\x05float area(){\x05\x05return (3.1
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/24 13:51:09
错误warning C4761:integral size mismatch in argument; conversion supplied;怎么修改?错误程序:#includeusing namespace std;class SimpleCircle{public:\x05SimpleCircle(int *a)\x05{\x05\x05itsRadius=a;\x05}\x05float area(){\x05\x05return (3.1
错误warning C4761:integral size mismatch in argument; conversion supplied;怎么修改?
错误程序:
#include
using namespace std;
class SimpleCircle
{
public:
\x05SimpleCircle(int *a)
\x05{
\x05\x05itsRadius=a;
\x05}
\x05float area(){
\x05\x05return (3.14*(*itsRadius)*(*itsRadius));
\x05}
\x05float circumference(){
\x05\x05return (3.14*2*(*itsRadius));
\x05}
private:
\x05int *itsRadius;
};
int main()
{
\x05int b=5;
\x05SimpleCircle s(&b);
\x05cout
错误warning C4761:integral size mismatch in argument; conversion supplied;怎么修改?错误程序:#includeusing namespace std;class SimpleCircle{public:\x05SimpleCircle(int *a)\x05{\x05\x05itsRadius=a;\x05}\x05float area(){\x05\x05return (3.1
cout