Can std::string
be considered like a concrete implementation of std::vector<char*>
(saving the differences)? std::string
looks like a buffer of characters grouped in a typename, with concrete methods that allows you to manipullate characters in a neat and convenient way. But I wanted to know what are beyond those implications, and the differences at storage level of the data between the both two.
Asked
Active
Viewed 15 times
0

Not Jungler's Fault
- 163
- 10
-
You might want to read up on short string optimization. – Nelfeal Nov 20 '22 at 14:30
-
you can also have `std::string_view` over `std::vector`. but as always. use a string if you want a string. – apple apple Nov 20 '22 at 14:54