I
I
Ilya1992018-07-11 20:00:13
visual studio
Ilya199, 2018-07-11 20:00:13

How to use scanf function in visual studio?

C Language
When I compile, visual studio shows an error:
'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
When I compile via command line, everything is fine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2018-07-11
@Ilya199

Are you sure this is an error and not a warning? I'm not here.
How do you compile via command line? Perhaps there is either a different compiler, or a different environment, or other compilation settings, or just the warnings are not shown.
Use as it is written in the warning - another scanf_s function, or disable security warnings, or kill it (but understand what it is fraught with).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question