Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > references as p...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 11 Topic 44120 of 48011
Post > Topic >>

references as parameters

by neelagain@[EMAIL PROTECTED] Mar 26, 2008 at 12:06 AM

Hi,

This question _must_ have been asked before but I don't seem to find a
exact question(answer) right now.

I wanted to know what is the down side of passing parameters as
reference for data type >= 4 bytes.

For example:

funcRef(const int & i) or funcRef(const UINT & u)

How exactly is this worse than:

funcRef(const int i) or funcRef(const UINT u)

From what I know variables are created in each case, and each of four
bytes. But, type checking is better in first version than next
version. Am I correct?

Thanks,
Neel.
 




 11 Posts in Topic:
references as parameters
neelagain@[EMAIL PROTECTE  2008-03-26 00:06:53 
Re: references as parameters
Ian Collins <ian-news@  2008-03-26 20:25:40 
Re: references as parameters
neelagain@[EMAIL PROTECTE  2008-03-26 01:32:09 
Re: references as parameters
Ian Collins <ian-news@  2008-03-26 23:39:53 
Re: references as parameters
dave_mikesell@[EMAIL PROT  2008-03-26 05:46:27 
Re: references as parameters
neelagain@[EMAIL PROTECTE  2008-03-27 00:43:26 
Re: references as parameters
"Fred Zwarts" &  2008-03-27 09:55:44 
Re: references as parameters
Matthias Buelow <mkb@[  2008-03-28 13:34:56 
Re: references as parameters
dave_mikesell@[EMAIL PROT  2008-03-27 02:53:49 
Re: references as parameters
Matthias Buelow <mkb@[  2008-03-28 13:09:50 
Re: references as parameters
James Kanze <james.kan  2008-03-28 15:03:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 3:58:37 CDT 2008.