📄 subject_51838.htm
字号:
<p>
序号:51838 发表者:IT40 发表日期:2003-09-04 19:36:01
<br>主题:关于临时对象的问题
<br>内容:比如string("hello")这是个临时对象吗<BR>在用它的时候是否系统会再生成一个对象来存放它<BR>就象string tmp=string("hello");<BR>然后使用tmp??
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:天才 回复日期:2003-09-05 09:27:30
<br>内容:string tmp=string("hello");相当于string tmp("hello");<BR>如果是string tmp;tmp=string("hello");则就象楼主说的那样了,临时对象会在tmp=string("hello");这句结束后立刻销毁。<BR><BR>我做了个实验验证的,如果有不对之处请一定指正。<BR>2003-9-5 9:28:51
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -