I need help because I do not know what the error means so I am not sure how to correct this. The error states:
.cpp(70) : warning C4996: 'strncpy' was declared deprecated
\string.h(156) : see declaration of 'strncpy'
My code is the following:
// set the tool name
void Tools::setToolName( string toolNameString)
{
// copy at most 20 characters for the tool name
const char *toolNameValue = toolNameString.data();
int length = int(toolNameString.size());
length = ( length < 20 ? length : 19 );
strncpy( toolName, toolNameValue, length);
toolName[ length ] = '\0'; // append null character to lastName
}
Specifically there is an issue with my strncpy:
strncpy( toolName, toolNameValue, length);