+ 2
basic question in c++
in string class we have function basic_string& append(Inputiterator_first,Inputiterator_Last) my question is what is meaning of '&' and why they have put '&' sign between string and append
4 Answers
+ 2
format is always the same :
return_type name(parameters)
so the function returns a reference (here is the use of '&') to a basic_string
checkout reference for more information & examples : https://en.cppreference.com/w/cpp/string/basic_string/append
+ 1
thank u ~ swim ~ and darrencweid
+ 1
~ swim ~ yes thanks, fixed ;)