Friday, 23 November 2018

What is difference between insert and emplace for vector in C++

Apart from single insertion using emplace and multiple insertion using insert in vector,
is there any other difference in their implementation?




As in both cases inserting any element will shift all other elements.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...