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

difference in the 2 initializations

P: n/a
hi,
i would want to know the difference in the 2 initializations which are :

1. int a(20);

2.int a = 20;

thanking all those who answer this.
maadhuu.

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
maadhuu wrote:
hi,
i would want to know the difference in the 2 initializations which are :

1. int a(20);

2.int a = 20;

thanking all those who answer this.
maadhuu.


http://groups-beta.google.com/group/...3d7cde33774a28
Jul 23 '05 #2

P: n/a
On Sat, 23 Jul 2005 10:22:12 +0400, maadhuu <ma************@yahoo.com>
wrote:
hi,
i would want to know the difference in the 2 initializations which are :

1. int a(20);

2.int a = 20;


The former is direct initialization, the latter is copy initialization.
For built-in types there is no difference.

http://www.gotw.ca/gotw/036.htm

--
Maxim Yegorushkin
<fi****************@gmail.com>
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.