#include"sts.h" #if(0)class Base{public:      void f(int x){cout<<"Base::f(int)"<
<
<<"Base::f(float)"<
<
f(42);   //Base::f(int)42pb->f(4.2f); //Base::f(float)4.2pb->g();     //Drived::g(void)return 0;}#endif#if(0)class Base2{public:     virtual  void f(float x){cout<<"B::f(float)"<
<
<<"B::g(float)"<
<
<<"B::h(float)"<
<
<<"D::f(float)"<
<
f(1.1f);  pd->f(2.2f); pb->g(3.3f);  pd->g(4.4f); pb->h(5.5f);  pd->h(6.6f); /*D::f(float)1.1D::f(float)2.2B::g(float)3.3D::g(float)4.4B::h(float)5.5D::h(float)6.6*/return 0;}#endif#if(0)class b { public:void f(int x);};//class d:public b{public:void f(char *str);};class d:public b{public:void f(char *str);void f(int x){b::f(x);}};void test(void){d *pd=new d;pd->f(10);}/*编译报错*/int main() { cout<<"wzzx"<
(b)?(a):(b)#define max2(a,b) ((a)>(b)?(a):(b))int main(){int x=1;int y=2;cout<<(max1(x,y)+2)<
(y)?(x):(y)+2cout<<(max2(x,y)+2)<
(y)?(x):(y)+2cout<<(max1(x++,y)+2)<
(y)?(x):(y)+2cout<<(max2(x++,y)+2)<