By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,605 Members | 1,483 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,605 IT Pros & Developers. It's quick & easy.

C++ Internals

P: n/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

Nov 15 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Art wrote:
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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Nov 15 '06 #2

P: n/a
And where can find FAQ 5.2??

Victor Bazarov wrote:
Art wrote:
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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Nov 15 '06 #3

P: n/a
RecycleYourAnimals wrote:
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

Nov 15 '06 #4

P: n/a
RecycleYourAnimals wrote:
And where can find FAQ 5.2??
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
What happened when you searched for comp.lang.c++ FAQ in your favorite
search engine?

Brian
Nov 15 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.