February 25th, 2013, 03:14 AM
Quick question about string concatentation
What is the efficiency of the two assignments (line 1 and 2), i.e. (function calls, number of copies made, etc), also the Big O notation. I know there are function calls for retrieving the size of each string in order to produce a new buffer for the concatenated string...any difference between line 1 and 2 in terms of efficiency?
1. s = s + t;
2. s += t;
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!