hi,guys
I see that some codes in cc like this one.
e.g.
void functionname (const classname& var)
{
classname localvar = var;
......
}
here,in the function body functionname, why it make a copy for "var".
if want to make a copy for "var",why not use it in this way??
void functionname (const classname var)
{
//classname localvar = var;
......
}
correct me if I am wrong,thanks.