This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / C++编程问题:自我初始化在什么情况下是有意义的?那位熟悉C++的指点一下?谢谢比如语句:
int x=x;
是合法的,编译时也是正确的,用书上的话说,"This is not illegal, just silly."
那什么情况下自我初始化时有意义的?那位给个例子?
-mike20030405(麦客);
2007-12-20
{156}
(#4134103@0)
-
never
-dusk(~小桥流水~);
2007-12-20
(#4134112@0)
-
把精力用到别的该用的地方吧.
-tdr(行色匆匆);
2007-12-20
(#4134136@0)
-
Compiler should be able to detect the error or warning for this. As tdr(行色匆匆) says, it doesn't make sense to waste time on this.
-wangqingshui(忘情水);
2007-12-20
(#4134280@0)