i am trying to copy 2 strings in a function, to a new dynamic memory by the strlen() function.
char* PairSortedArrays(char a[], char b[])
{
char* p1 = (char*)malloc(strlen(a) + strlen(b) + 1);
if(p1)
{
strcpy(p1, a);
strcat(p1, b);
}
return p1;
}
Getting Compiler Error:
Severity Code Description Project File Line Suppression State
Error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. check C:\Users\97254\source\repos\check\check\Source.c 35