d****n 发帖数: 1241 | 1
我觉得是unspecified behavior, evaluation order of LHS and RHS
is unspecified. f()的"return i-1"之后有一个sequence point, 所以不存在两个
sequence points之间存在多个writes的问题。
这里我认为是正确的
不过这个程序里,存在一个undefined behavior, main函数必须return一个int,否则
是UB. |
|
q****x 发帖数: 7404 | 2 就是赋值初始化的rhs类型?
auto x = y; //x.typeid() == y.typeid()
很少看到下面的写法,为什么呢?
auto x("hello"); |
|
m****r 发帖数: 59 | 3 After compiling, I ran the program. Linux gave me this error
message and nothing else.
When I use debugger to debug, entering some function ( I
guess that contains some mistakes), the message is :
__eq__H3ZcZt18string_char_traits1ZcZt24__default_alloc_templ
ate2b1i0_RCt12basic_string3ZX01ZX11ZX21PCX01_b
(lhs=@0xbffff75c, rhs=0x804f801 "") at
../../../libstdc++/std/straits.h:125
Does this mean something wrong with standard lib file? Or I
used them wrong? Or, something else???
Please tell me why, |
|
K****n 发帖数: 5970 | 4 看,这就是google这个网站全部的源代码:
大哥大嫂过年好!
content="text/html; charset=UTF-8">Google
|
|