如何在c ++中通过构造函数访问类访问中的私有成员
问题描述:
不使用复制构造函数..........
Without use copy constructor ..........
答
您可以封装变量示例:
http://www.tutorialspoint.com/cplusplus/cpp_data_encapsulation.htm [ ^ ]
或者你可以创建设置和获取变量的方法
You can encapsulate your variables example:
http://www.tutorialspoint.com/cplusplus/cpp_data_encapsulation.htm[^]
or you can create methos to set and get variables