C++ Internals

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
 
V

Victor Bazarov

Art said:
Hi ,

I have a couple questions I was hoping to get experts answers on. Here
goes:

[..]

Not surprisingly, these all are covered in the FAQ 5.2.

V
 
M

mlimber

RecycleYourAnimals said:
And where can find FAQ 5.2??

A link is posted regularly in this group; please search the archives.
You'll also want to note that FAQ 5.4 strongly suggests you don't
top-post, as you did here.

Cheers! --M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top