×

Loading...

完全正确!这在UNIX下编译是可以的。修改的方法是将print中参数形式改为const &或const *.或者定义拷贝构造函数,因为题中调用缺省的拷贝构造函数是将成员一一拷贝,而不拷贝指针指向的数值。

xxjjs (东方射日)
(#164139@0)
2001-8-12 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 国内一家公司招聘C++ Programmer的面试题:

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论