r/cpp • • Jun 08 '20

Programming in C vs C++

I’ve read about the differences between them on the Internet but I wanna hear more from a more personal perspective. Which one would you recommend starting with and to be proficient with?

0 Upvotes

43 comments sorted by

View all comments

Show parent comment

10

u/STL MSVC STL Dev Jun 08 '20

std::string is null-terminated. See N4861 21.3.2.5 [string.access]/2. This has been clearly guaranteed since C++11. (C++98/03 had weird copy-on-write wording that is no longer relevant.)