Questions tagged «static-functions»

1
静态成员函数错误;如何正确签名?
尝试使用当前签名在g ++中编译代码时出现错误: cannot declare member function static void Foo::Bar(std::ostream&, const Foo::Node*) to have static linkage 我的问题是双重的: 为什么不这样编译? 什么是正确的签名,为什么? 使用C ++时签名始终是我的死 编辑:这也是类头文件: class Foo { public: Foo(); ~Foo(); bool insert(const Foo2 &v); Foo * find(const Foo2 &v); const Foo * find(const Foo2 &v) const; void output(ostream &s) const; private: //Foo(const Foo …

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.