//可以运行
#include
using namespace std;
class ABC
{
private:
int x;
public:
explicit ABC(int
xx)
{
x = xx;
}
void
show()
{
cout<<x<<endl;
}
};
int main()
{
ABC abc(100);
abc.show();
return
0;
}
//可以运行
#include
using namespace std;
class ABC
{
private:
int x;
public:
ABC(int xx)
{
x =
xx;
}
void
show()
{
cout<<x<<endl;
}
};
int main()
{
ABC abc = 100;
abc.show();
return
0;
}
//无法运行通过
#include
using namespace std;
class ABC
{
private:
int x;
public:
explicit ABC(int
xx)
{
x =
xx;
}
void
show()
{
cout<<x<<endl;
}
};
int main()
{
ABC abc = 100;
abc.show();
return
0;
}
#include
using namespace std;
class ABC
{
private:
public:
};
int main()
{
}
//可以运行
#include
using namespace std;
class ABC
{
private:
public:
};
int main()
{
}
//无法运行通过
#include
using namespace std;
class ABC
{
private:
public:
};
int main()
{
}