KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I know that if you write void function_name(int& a) , then the function will not do local copy of your variable passed as argument. Also have met in literature that you should write void function_name(const int & a) in order to say compiler, that I don't want the variable passed as argument to be copied. So my question: what is the difference with these two cases (except that const ensures that the variable passed will not be changed by function)?
Tags (comma-separated)
Save Edits
Cancel