您好我正在尝试访问私有成员函数是Gtest
. 代码看起来与此有些相似。那么,我该如何访问static void Pri_fun
?
using namespace std;
class test{
};
class abc{
public:
friend class test;
private:
static void Pri_fun()
{
cout << "private fun called \n";
}
};
int main()
{
abc ab;
test *abd;
abd->Pri_fun();
}