How can I replace strcpy without losing performance?
for (i = 0; i < kol; i++) if ((strcmp(Regname.Name, mas[i].Name) == 0) && (strcmp(Regname.Password, mas[i].Password) == 0)) { strcpy(role, mas[i].role); delete[]mas; return Regname.Name; } This question has appeared, because constantly getting an error about an insecure function or variable.
Error C4996. To solve it define define _CRT_SECURE_NO_WARNINGS is not an option.
I would like to hear the answer for the modern level, if the strcpy is "obsolete".
Replacing strcpy_s causes other errors:
There are no instances of the overloaded function "strcpy_s" function corresponding to the argument list.
strcpy_s: the function does not accept 2 arguments
If you write 3 arguments, as it should be, it displays an error: 
Хотелось бы услышать ответ для современного уровня- can usestd::string- dirariastrcpy_s. - VTTstrncpy()- Fat-Zerstrcpyorstrcpy_s. What does she have to do with it? - AnT