avatar
Devnull @devnull73.bsky.social

Wait, how is a string not a char array to begin with? 🤣

aug 26, 2025, 1:48 am • 1 0

Replies

avatar
Cam @camwin7.bsky.social

You're right, its called a wrapper. std::string has the type of std::basic_string, which behaves as if a wrapper around a char array. Our array types, like std::vector behaves as if a wrapper around a pointer w/ new and delete, while std::array behaves as if a wrapper around C-style arrays.

aug 26, 2025, 2:11 am • 0 0 • view