0

What is the function of x++

i am confused

24th Jul 2017, 7:27 AM
Random Animation
Random Animation - avatar
5 Answers
+ 1
If the operators are in front of the variable, it's called prefix while the operators behind it are called postfix. A prefix changes the variable before it is used in the expression, postfixes change the variable's value after it is used in the expression. int x = 2; cout >> x++ 2 x = 2; cout >> ++x 3
24th Jul 2017, 8:10 AM
Jonas Schröter
Jonas Schröter - avatar
0
is this function important?? i am new here
24th Jul 2017, 11:23 AM
Random Animation
Random Animation - avatar
0
It's short and often used, so it's important to know what it is doing.
24th Jul 2017, 12:20 PM
Jonas Schröter
Jonas Schröter - avatar
0
alright, thanks for answering my question
24th Jul 2017, 12:21 PM
Random Animation
Random Animation - avatar
0
😊
24th Jul 2017, 12:21 PM
Jonas Schröter
Jonas Schröter - avatar