D
Donos
class CValue
{
public:
void set(int n1) {m_i[0] = n1;};
void get(int& n1) {n1 = m_i[0]};
protected:
int m_i[2];
};
class CSetValue
{
public:
void CSetValue::SendValue()
{
CValue m_Value;
int i = 10;
m_Value.set(i);
}
};
class CGetValue
{
public:
void CGetValue::RecieveValue()
{
int k;
CValue m_Value;
m_Value.get(k);
}
};
I am expecting in class CGetValue, the integer variable "k", should
get the value which was earlier set by "set" function.
But somehow this is not working.
Any idea?
Thanks
{
public:
void set(int n1) {m_i[0] = n1;};
void get(int& n1) {n1 = m_i[0]};
protected:
int m_i[2];
};
class CSetValue
{
public:
void CSetValue::SendValue()
{
CValue m_Value;
int i = 10;
m_Value.set(i);
}
};
class CGetValue
{
public:
void CGetValue::RecieveValue()
{
int k;
CValue m_Value;
m_Value.get(k);
}
};
I am expecting in class CGetValue, the integer variable "k", should
get the value which was earlier set by "set" function.
But somehow this is not working.
Any idea?
Thanks