Message from C, C++ discussions

November 2019

— Im getting 0 as the output.


If only 1 function called a function once is ok.but what is i have 2 different function but calling same is hard to manage it

— 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:

Message permanent page

— 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++

— 何ですが?