C++构造函数问题4

null

#include<iostream>
using namespace std;
class Point {
public :
Point() { cout << "Constructor called" ; }
};
int main()
{
Point t1, *t2;
return 0;
}


(A) 编译错误 (B) 构造函数调用 构造函数调用 (C) 构造函数调用 答复: (C) 说明: 这里只构造了一个对象t1。t2只是一个指针变量,而不是一个对象 这个问题的小测验

© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享