0

When I code in C using VScode, I don't see any problems during the coding. Here is a screenshot as an example:

enter image description here

As you can see, the editor doesn't tell me anything about the printf22 that I wrote.

Timothy G.
  • 6,335
  • 7
  • 30
  • 46
The su
  • 9
  • 1
  • 1
    Does this answer your question? [How to show warnings in VSCode editor for a .cpp file?](https://stackoverflow.com/questions/60872633/how-to-show-warnings-in-vscode-editor-for-a-cpp-file) – Tom Karzes Jul 12 '21 at 16:01
  • Which OS are you using? – fpiette Jul 13 '21 at 13:50

2 Answers2

0

Put the minGW C compiler into the path of your system properly, then try to run

  • I have the right path but it still doesn't show any errors during the coding, only when I cimpile it shows me errors :( – The su Jul 12 '21 at 21:35
0

Try with VS extension "C/C++ Clang Command Adapter" or "Visual Studio IntelliCode" from VS code. That would give you warning before compilation.

cslrnr
  • 694
  • 1
  • 8
  • 24
  • I already have minGW, I tried to install now "Visual Studio IntelliCode" but I dont understand how to make it effect my code... – The su Jul 12 '21 at 21:34
  • one of the tool if you have installed automatically warns you if you are typing something wrong with existing library functions etc – cslrnr Jul 13 '21 at 05:55
  • do you know how can I activate it? – The su Jul 13 '21 at 06:31
  • Ok, I think you havent set env path in windows, Pls try to set the mingw bin path, https://stackoverflow.com/questions/44272416/how-to-add-a-folder-to-path-environment-variable-in-windows-10-with-screensho/44272417 , path would be like C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin – cslrnr Jul 13 '21 at 08:55