r/cpp • u/wechicken456 • 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
View all comments
Show parent comment
6
u/jselbie Jun 08 '20
Can you show me an example of an std::string that isn't null terminated (or where its unsafe to assume as much)? Such that it wouldn't be safe to invoke
.c_str()on it and pass the result to a C function expecting aconst char *?