C默认构造函数
作者:互联网
如果说默认构造函数是不带参数的构造函数,是否还可以说编译器创建的构造函数也是默认构造函数?
谢谢.
解决方法:
默认构造函数是可以不带参数调用的构造函数.
C 98§12.1/ 5:
A default constructor for a class
X
is a constructor ofX
that can be called without an argument. If there is no user-declared constructor for classX
, a default constructor is implicitly declared.
标签:c,default-constructor 来源: https://codeday.me/bug/20191010/1887338.html