Board index » Visual Studio » About the problem "b++"
|
Gpeica
|
About the problem "b++"
Visual Studio384
Hi,everyone When I first learned VC++ 6.0,I met a problem about "b++".The code as followed, #include <iostream.h> void main() { int b(5),c(3); a=b+++--c; cout<<a<<','<<b<<','<<c<<endl; } As the rules, "a=b+++--c" should be calculated as "a=b++ + --c".When I run the program,the result is 7,6,2.But I don't understand why it display "7",why not "8"? Thanks in advance, Ely - |
