构造函数到底有没有返回值
- C/C++ code
构造函数有返回值的。。#include <iostream.h>class B{ private: int m_nData; public: B( int nData = 0) { m_nData = nData; cout << "B()" << endl; }};int main(int argc, char* argv[]){ B theA; B theB = theA.B::B(10); return 0;}代码如上,我认为有 大家说下
[解决办法]
标准都规定没有了。