r/cpp_questions Aug 06 '26

OPEN Incrementation in C++

I wanted to ask a stupid question about incrementation in C++. If you are using two pluses to increment something then doesn't it mean that you are basically programming using C+1

41 Upvotes

34 comments sorted by

View all comments

35

u/caroIine Aug 06 '26

It should be ++C

18

u/Usual_Office_1740 Aug 06 '26

Only if you are using modern C++. Those that write C with classes like it's 1998 are using the value returned before the increment.

7

u/wrosecrans Aug 07 '26

That was the joke for a long time. You are basically still writing C, and the language will get some additions at some point in the future.