Message from C, C++ discussions

November 2019

โ€” I've just found out that your code has undefined behaviour. Initialize output to 1;


I'll give you a solution. It's the fully generalized version for C++20 (I did it for fun), so it may not fit your purpose:

โ€” Hello

โ€” Ohhh okay. Thank You sir ๐Ÿ˜ƒ

โ€” Yh

โ€” And does the right to left precedence holds true even for function call?

fun(x++, ++x);

Or is it still UB in C++17?

Message permanent page

โ€” Left and right does apply in regards to the assignment operator [expr.ass].
For function calls in c++ C++17 it's no longer undefined behavior but it's unspecified instead.

From [] "The initialization of a parameter, including every associated value computation and side effect, is indeterminately sequenced with respect to that of any other parameter."

Message permanent page

โ€” Explanation pls

โ€” Hello house, please I need a strong and comprehensive ebook on c++

โ€” ไฝ•ใงใ™ใŒ๏ผŸ

โ€” Undefined or unspecific behavior

โ€” English only