c++ 类中 静态成员函数 怎样声明和定义?

如题所述

//示例类demo
class demo{
public:
    //静态成员函数Print的申明定义
    static void Print( void ) {
        std::cout << "this is a static method." << endl;
    }
}

温馨提示:答案为网友推荐,仅供参考
相似回答