I have a simple function and string:
In the first case, the string will be copied when passed to function, and in the second case it will pass the reference (it wont copy the data)?Code:std::string test = "some string data..."; some_func(test); void some_func(std::string test) { } void some_func(std::string &test) { }
Am I correct?