I want to solve this problem without "#pragma warning (disable:4996)" please help me. I tried many things. I think it may have problem with visual studio.
Use scanf_s()
and make the necessary other changes, or #define _CRT_SECURE_NO_WARNINGS
. Basically, read the error message and do what it suggests.
Note that scanf_s()
requires extra arguments for the lengths of “string” arguments.