The use of ``++strlen++`` to determine the length of a string to which you are trying to append a null character is an anti-pattern. ``++strlen++`` requires as input an already null-terminated string;the result of passing a non-null-terminated string as an input to ``++strlen++`` is undefined. It may even lead to a memory access violation.