class A
{
private:
std::string a1_str_;
std::string a2_str_;
};
Although the following code is illeagal, but I want to use it to illustrate what I want.
A a;
std::string* str1_ptr = &a.a1_str_;
std::string* str2_ptr = &a.a2_str_;
Hi,
You can't do this, it's private - any attempt to do so would be illegal: one can't (reliably) subvert the security.
Instead write a public function that uses the string to do whatever processing, and return the result.
Good Luck !!