classbase{private:int m;public://在类体内定义的成员函数,自动被编译器当做内联函数处理voidprint1(){ cout<<"inline function within the class "<<endl;}voidprint2();};//在类体外定义的成员函数,如果用inline修饰,则编译器也认为是一种内联建议inlinevoid base::print2(){ cout<<"inline function outside the class "<<endl;}