C ++中的访问说明符 [英] Access specifiers in C++

查看:93
本文介绍了C ++中的访问说明符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码,

template< typename T >
class T1 { 
public:
    T i;
protected:
    T j;
private:
    T k;
    friend void Test();
};

上面的代码有一个模板类T1,有三个成员i,j和k, (),

The above code has a template class T1 with three members i,j and k and a friend function Test(),

我只想知道T1的哪些成员将在函数Test()中可用?

I just want to know that which member/s of T1 will be available in function Test()?

这方面的任何帮助将受到高度赞赏。

Any help in this regard will be highly appreciated.

推荐答案


知道T1中的哪些成员将在函数Test()中可用?

I just want to know that which member/s of T1 will be available in function Test()?

i,j和k

这篇关于C ++中的访问说明符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆