Question: how to do strncpy in c++?
Answer: char* strncpy( char* dest, const char* src, size_t count ); The strncpy() function takes three arguments: dest, src and count. It copies a maximum of count characters from the string pointed to by src to the memory location pointed to by dest .