sgetn
Takes a char*
for it's first argument and writes characters to it. It does not write a trailing '\0'
to the char*
.
This behavior seems to be inconsistent with every other time that I can find a char*
written to. However, it is consistent across Clang, gcc, and Visual Studio, so I can't believe it's a bug that all the compilers have.
Is there a reason that the standard doesn't require the trailing '\0'
to the char*
?
[Live Example]