Il nome della funzione in questione è strncpy, non strcnpy...
Amaro C++, il gusto pieno dell'undefined behavior.
Regole del Forum