源程序:
#include <iostream>
#include <cmath>
using namespace std;
class A
{
private:
const int a;
public:
A(int x)
{
a=x;
}
void show()
{
cout<<"a="<<a<<endl;
}
};
int main()
{
A m(5);
m.show();
return 1;
}
微信扫一扫
源程序:
#include <iostream>
#include <cmath>
using namespace std;
class A
{
private:
const int a;
public:
A(int x)
{
a=x;
}
void show()
{
cout<<"a="<<a<<endl;
}
};
int main()
{
A m(5);
m.show();
return 1;
}
相关推荐