About VS2017 warnings and errors \ crazy
Item 1. severity code file line status error suppresses C4996 'getch': The POSIX name for this item is deprecated Instead, use the ISO C and C ++ conformant name:. _Getch See online help for details ConsoleApplication2 c:.. \ users \ desktop \ biancheng \ vs \ consoleapplication2 \ consoleapplication2 \ consoleapplication2.cpp 9
after translation means:
C499 "getch": the POSIX name of the project was abandoned. Instead, use the same name ISOC and C ++: For more information, see the online help.
2. different from the VC, VS C library has updated security version.
Scanf scanf_s example to
many other functions may be added _s
and more error sucked _getch () Replace getch ()
as well as #include <conio.h> inside the functions that require changing
itoa (i, x, 2) into _itoa_s (I, x, 2)
3. If a halt,
can use the system ( "pause"); Alternatively getch ();
4. Item file line severity codes prohibit the display state
error (activities) E0311 not only overloaded by return type of the function to distinguish ConsoleApplication2 C: \ Users \ Desktop \ VS \ ConsoleApplication2 \ ConsoleApplication2 \ SeqQueue.h
what is written there is no Functions the body does not define strange error
Missing the initial write in your own header file
#ifndef SEQQUEUE_H
#define SEQQUEUE_H
and ending
#endif SEQQUEUE_H
Item 5. The severity code file line prohibiting display 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 ConsoleApplication3 c:... \ Users \ 23607 \ desktop \ biancheng \ vs \ consoleapplication3 \ consoleapplication3 \ consoleapplication3.cpp 13
VS compiled code is encountered with the above problems, vs strcpy is prepared abandoned, less secure, so Microsoft provides strcpy_s instead of strcpy , if you want to continue to use strcpy, in front of main plus
#pragma warning(disable:4996)
6.#define _AFXDLL or do not use /MD[d]
If Debug "Working in a static library MFC", do not use MDd, instead MTd, then the compiler can pass.
If Debug "Use MFC in a shared DLL", be careful not to use MTd, instead MDd;
If it is Release Version "used in the static library MFC", do not use the MD, the use of MT;
If it is Release version of "use in a shared DLL MFC", do not use MT, use MD.