I have a function my_fun which returns random number.
How can I do declaration and value check in one line?
if (x= my_fun()<0)
if ((x= my_fun())<0)
if ((x= my_fun()<0)) // this is what my IDE suggests but looks strange since those extra braces don't help at all.
Source: Windows Questions C++