hi,
can somebody explain whether it is better to use a
reference/pointer/value in a following situation

class A
{
public:
int i_a;
};

class B
{
public:
int i_b;
};

class common
{
public:
common(const A *pa, const B *pa)
: i_a(pa->i_a),
i_b(pb->i_b)
{}
int &i_a;
int &i_b;
};


here what i want to do is use 'common' type of object as a container
to carry data which are in A and B

the questions i have are
1) by using references does 'common' become large in size(sizeof
references is size of datatype)
2)if so is it advantagous to use references over pointers


Reply via email to