I wrote the following code when I made an IP/PV statistics report. I haven't tried writing this code for a long time. I don't really remember how ++ uses prefixes or suffixes, but I remember when I was reading C ++ primer, it is said that C ++ programs should use prefixes, so this habit is retained.
I sent the following two pieces of code to a student on QQ and asked him if he could get 1 correct.
Section 1:
IntI = 0;
Map <string, integer> map =NewTreemap <string, integer> ();
Map. Put ("0", I );
IntOrgin = map. Get ("0 ");
Map. Put ("0", ++ orgin );
System.Out. Println (Map. Get ("0 "));
Section 2:
IntI = 0;
Map <string, integer> map =NewTreemap <string, integer> ();
Map. Put ("0", I );
IntOrgin = map. Get ("0 ");
Map. Put ("0", ++ orgin );
System.Out. Println (Map. Get ("0 "));
The student did not hesitate to say the first paragraph. After all, people are made of j2's, and every day they come into contact with these operators, which is not a fuel-saving Lamp.