Categories
October Surprise 2024

basic_string class | Microsoft Learn

The returned C-style string shouldn’t be modified, which could invalidate the pointer to the string, or deleted, as the string has a limited lifetime and is owned by the class string.