use the C++ <cstring> library functions strlen, strcal_s, strcpy_s, instead of using your own equivalent developed functions.