相关文章
- 10-30012 public等关键字可见性
- 10-30导出Private API
- 10-301.(1)编写一个接口ShapePara,要求: 接口中的方法: int getArea():获得图形的面积。int getCircumference():获得图形的周长 (2)编写一个圆类Circle,要求:圆类Circle实现接口ShapePara。 该类包含有成员变量: radius:public 修饰的double类型radius,表示圆的半径。 x:private修饰的double型变量
- 10-30已解决:JObject.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: double __cdecl
- 10-30PowerMockito,Mockito private 方法的mock和test
- 10-30PAT A1018 Public Bike Management (30 分)
- 10-30Effective C++ -----条款32:确定你的public继承塑模出is-a关系
- 10-30Public, Private and Protect
- 10-301018 Public Bike Management (30分)
- 10-30A1018 Public Bike Management (30分)
class A
{
public:
friend class B;
};
and
class A
{
private: //or nothing as the default is private
friend class B;
};
Is there a difference?
No, there‘s no difference - you just tell that class B is a friend of class A and now can access its private and protected members, that‘s all.