-5

I am very much new at coding in c++. I am following code with harry youtube channel for coding. in the first video vs code installation setup I followed every step he did in the same but in my vs code,it is displaying an error. see in image image

  • 3
    I see the "unsaved changes" indicator on tut1.cpp. Have you saved the file since writing your code in it? – Nathan Pierson Dec 20 '21 at 15:38
  • 2
    @ankit kumar, try to avoid posting images as your question. This prevents the question from being indexed properly and others with the same problem finding and answer. – J'e Dec 20 '21 at 15:45
  • [This answer](https://stackoverflow.com/a/38448000/1563833) supports Nathan's theory that the file may have been unsaved at the moment of compilation. – Wyck Dec 20 '21 at 16:15
  • dup of [Why don't other programs see the changes I made to a file in VS Code until I save those changes?](/q/76984829/11107541) – starball Aug 27 '23 at 06:39

2 Answers2

0

I think your code is not saved. Do Ctrl+S and then try running it again.

0

Try to make sure your compiler is successfully installed which I think it has. But you can enter g++ --version in the command line to see if it's ok.
Other than that, make sure to save your source and headers files (just do ctrl + s in each file) before trying to build your program.

digito_evo
  • 3,216
  • 2
  • 14
  • 42
  • yaa there was an error shown during the installation of mingw file but I tried again after deleting everything but that error shows again what can I do? – ankit kumar Dec 21 '21 at 06:28
  • @ankit kumar Go to this link: https://winlibs.com/ and download the WinLibs build of mingw-w64 if you have a 64-bit system. Downloading the UCRT version is better if you have Windows 10 or later. And also you won't need to install it. You can read about how to do it in the link I provided. – digito_evo Dec 21 '21 at 07:02