📄 p463程序的输出文件及其说明howmany.out
字号:
HowMany() called
h and now s_objectCount is 1
entering f()
HowMany( const HowMany &) called //将实参h拷贝给形参x ,使x的name就是 h copy
h copy and now s_objectCount is 2
returning from f()
HowMany( const HowMany &) called //return x 给h2,使h2的name是 h copy copy。
h copy copy and now s_objectCount is 3
~HowMany() called //函数执行完毕对x调用析构函数
h copy and now s_objectCount is 2
h2 after call to f()
h copy copy and now s_objectCount is 2
call f(), no return value
HowMany( const HowMany &) called //将实参h拷贝给形参x ,使x的name就是 h copy
h copy and now s_objectCount is 3
returning from f()
HowMany( const HowMany &) called //虽然没有return value,但是return x照样执行
h copy copy and now s_objectCount is 4
~HowMany() called //析构x
h copy and now s_objectCount is 3
~HowMany() called //析构x的拷贝即由return x 形成的临时变量
h copy copy and now s_objectCount is 2
after call to f()
~HowMany() called //析构h2
h copy copy and now s_objectCount is 1
~HowMany() called //析构h
h and now s_objectCount is 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -