N
neelagain
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.
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.