strncpystest.cpp 122 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 #include <string.h> int main(void) { char hostname[1024]; strncpy_s(hostname,1024,"localhost",_TRUNCATE); return 0; }