Strcpy_s cannot use two parameters? How to solve? Where is wrong?
The code is as follows:
Char * name;
Char temname [20].
Cin> Temname;
Name=new char [strlen (temname) + 1);
Strcpy (name, temname);
CodePudding user response:
http://bbs.csdn.net/topics/250036875CodePudding user response:
#include#include
Int main (void)
{
Char string [10].
Char * str1="abcdefghi";
Strcpy_s (string, 10, str1);
Printf (" % s \ n ", string);
return 0;
}
Secure strcpy need to specify the address space of the target