It’s parsed as c = a++ + b
, and a++
means post-increment, i.e. increment after taking the value of a
to compute a + b == 2 + 5
.
Please, never write code like this.
More Related Contents:
- Why the values {1, 1, 0, -1, -1, -1, 0, 1} and {0, 1, 1, 1, 0, -1, -1, -1} were chosen for dx[dir] and dy[dir]? [closed]
- How can this code be reversed? (recursion)
- Hi, Just Want to Know What This Error Means
- How to determine if a string is a number with C++?
- How to call C++ function from C?
- Macro for dllexport/dllimport switch
- C++ Static member method call on class instance
- getline not working properly ? What could be the reasons? [duplicate]
- What’s up with the thousands of warnings in standard headers in MSVC -Wall?
- Why is the empty base class optimization (EBO) is not working in MSVC?
- need to call a function at periodic time intervals in c++
- How to convert char* to LPCWSTR?
- Can I download the Visual C++ Command Line Compiler without Visual Studio?
- Assertion failed (size.width>0 && size.height>0)
- How to target Windows XP in Microsoft Visual Studio C++ [duplicate]
- Value initialization and Non POD types
- Errors when linking to protobuf 3 on MS Visual C
- Layout of compiled objects
- trying to use VideoCapture and imshow(), raises Assertion failed (size.width>0 && size.height>0) in cv::imshow
- Finding “dead code” in a large C++ legacy application [closed]
- Weird MSC 8.0 error: “The value of ESP was not properly saved across a function call…”
- Visual c++ “for each” portability
- How to load a custom binary resource in a VC++ static library as part of a dll?
- Disabling Warnings generated via _CRT_SECURE_NO_DEPRECATE
- std::thread::join() hangs if called after main() exits when using VS2012 RC
- converting narrow string to wide string
- Possible problems with NOMINMAX on Visual C++
- Win32: Bring a window to top
- Why can’t Visual Studio find my DLL? [duplicate]
- reading an application’s manifest file?