Talk:cpp/io/c/vfprintf

If I understand correctly, the invocation

int bytes = std::vsnprintf(NULL, 0, fmt, args);

will _not_ include the null terminator in the count of the number of bytes to be written, even though the other forms will include a null terminator. Is that correct? Would it be worth making that point explicit on this page?


 * Good point. This page says it under "Return value" and also uses it in the example, where it does . And the page on std also says it under "Return value" and makes a slightly larger note with, but the C standard actually says right in the desc "not counting the terminating null character," - now done the same here. --Cubbi (talk) 12:18, 4 April 2018 (PDT)