A
Art
Hi ,
I have a couple questions I was hoping to get experts answers on. Here
goes:
1)Consider two classes A and B. Consider 2 different implementations
of the constructor for A
i) Class A{
B b;
A(B b1):b(b1){}
}
ii) Class A{
B b;
A(B b1){ b(b1);}
}
question: Is there a difference between i) and ii), if so what is it?
2)why is vector<A &> v; not allowed?
3)At compile time, how does a compiler know whether a "function call"
is going to be a dynamic call or a static call?
Any help is much appreciated.
Thanks
I have a couple questions I was hoping to get experts answers on. Here
goes:
1)Consider two classes A and B. Consider 2 different implementations
of the constructor for A
i) Class A{
B b;
A(B b1):b(b1){}
}
ii) Class A{
B b;
A(B b1){ b(b1);}
}
question: Is there a difference between i) and ii), if so what is it?
2)why is vector<A &> v; not allowed?
3)At compile time, how does a compiler know whether a "function call"
is going to be a dynamic call or a static call?
Any help is much appreciated.
Thanks