Need to pass private member of a Class as a argument to function of another class and get modified there
-
Need to pass private member of a Class as a argument to function of another class and get modified there and Class A will again user the modifed value of x there after.. int .Net Managed C++
class A
{
<pre> private :
int ^x;// actually this is a complex object
...
B ^ ojbB;ojbB->TheFunctionneedsPrivateObjectof\_A( int &x)// x will get modified in this function
// Use modified x
}</pre><pre>class B
{
public TheFunctionneedsPrivateObjectof_A(int ^x)
{
Modify x here
}}</pre>
-
Need to pass private member of a Class as a argument to function of another class and get modified there and Class A will again user the modifed value of x there after.. int .Net Managed C++
class A
{
<pre> private :
int ^x;// actually this is a complex object
...
B ^ ojbB;ojbB->TheFunctionneedsPrivateObjectof\_A( int &x)// x will get modified in this function
// Use modified x
}</pre><pre>class B
{
public TheFunctionneedsPrivateObjectof_A(int ^x)
{
Modify x here
}}</pre>
Please, do not cross-post. You have already posted the same question in Managed C++/CLI[^] forum. Your question has nothing to do with ATL/WTL/STL. Please stick to Managed C++/CLI forum.