C++????????????????8?????
?????zacklin ???????[ 2016/10/25 10:21:11 ] ??????????????????? C++
????6.?????????????????????
??????????????????????????????????????ò??????????????????????漲???????????????????Щ???顣???????????????????
????1x=5;
????????????????????????????x??????????и??????C++??????????*=??/=??%=??+=??-=??<<=??>& gt;=??&=??|=??^=???????????++??—???????????????C++???кü?????????????????δ??????????????????μ?????????磺
????voidmultiply(intx??inty) { usingnamespacestd; cout<<x*y<<endl; } intmain() { intx=5; std::cout<<multiply(x??++x); }
??????????????multiply()???????????????δ????????????????????????30??36????????????x??++x????????????
??????????????????й?????????????
????intfoo(intx) { returnx; } intmain() { intx=5; std::cout<<foo(x)*foo(++x); }
???????C++????????У??????????????????δ??????????????????????????????????????Щ?????????????????????????30??36????????????????????????????????????????
???????????????μ?????????
????if(x==1&&++y==2) //dosomething
??????????????????????“???x??1????y??????????2?????????Щ????”??????????x??????1??C++???????·???????????ζ??++y ??????????????????е?x????1???y???????????????????????????????????鷨??????κο???????????????????????????????????????????
????7. ????break??switch???
?????????????????????????????????????switch?????м???break??
????switch(nValue) { case1:eColor=Color::BLUE; case2:eColor=Color::PURPLE; case3:eColor=Color::GREEN; default:eColor=Color::RED; }
??????switch??????????????case?????????????????н????????????case?????С???????н???????????????????switch??????β??????????return??goto??break?????????????????????
?????????????????????nValue?1?????????case 1????????eColor?????Color::BLUE???????????????????????eColor???Color::PURPLE????????????????????Color::GREEN???????default?н????????Color::RED????????????nValue???????????????????ζ????? eColor???Color::RED??
????????????????????·????д??
????switch(nValue) { case1:eColor=Color::BLUE;break; case2:eColor=Color::PURPLE;break; case3:eColor=Color::GREEN;break; default:eColor=Color::RED;break; }
????break????????case??????У????eColor?????????????????????????????????????????????switch/case??????????????????????break??????????????“????”???????
????8. ????????е????麯??
???????????μ????
????classBase { private: intm_nID; public: Base() { m_nID=ClassID(); } //ClassID???????class????ID?? virtualintClassID(){return1;} intGetID(){returnm_nID;} }; classDerived:publicBase { public: Derived() { } virtualintClassID(){return2;} }; intmain() { DerivedcDerived; cout<<cDerived.GetID();//?????1??????2?? return0; }
??????????????У??????????????????е??????麯?????????????????????????Derived::ClassID()????????????????——?????????????1??????2??????????е????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????й?????????????????κζ??麯????????????????????????????????????????
??????????????????cDerived????????????????????????????????????????????????ClassID????y?????? Base::ClassID()??????Derived::ClassID()?????????????m_nID???1?????cDerived?????????????????????cDerived???????????κζ?ClassID()???????????????????????Derived::ClassID()??
?????????????????????C#??Java???麯?????t??????в????????class?????????????б???????????????C++????????????????????????????????????????????????????ù??????????????????????????????????????????????в????????????
????????
?????????????????????μ?????????????????????????????????????????????????????????е????????????????????????????????????????????????Σ???????????????????????????????????????????????????????????????????п???????鷳??????????????????????????????????????????????????????????????????????????????????????Щbug???????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??C++????????????C++ lvalue??rvalueC++11????????C++???????????????C++?е?????????????????C++?????????C++???Windows????λ??C/C++???????????????????JAVA??C??C++??????????c++??python???????????????????????????????C++???????C++?е????????C++????????????????C++ ???????????????C++?????????????????????C++????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????