SyntaxFix
Write A Post
Hire A Developer
Questions
'\0' is the way to go. It's a character, which is what's wanted in a string and has the null value.
When we say null terminated string in C/C++, it really means 'zero terminated string'. The NULL macro isn't intended for use in terminating strings.