Zomg, a project fork lol.
Here's a question: what's the difference between these:
andCode:void a(std::string x) {}
?Code:void a(std::string& x) {}
Or do these apply only when I have const before ?
Zomg, a project fork lol.
Here's a question: what's the difference between these:
andCode:void a(std::string x) {}
?Code:void a(std::string& x) {}
Or do these apply only when I have const before ?
Passing by value means a copy is made. Passing by reference does not involve copying. You could read this FAQ on references.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
another thing is that the second version is able to change the string x references