VS Code error messages when including iostream

Viewed 785

enter image description here

Error messages are:

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (D:\DINO\code\pong\pong.cc).C/C++(1696)

cannot open source file "crtdbg.h" (dependency of "iostream")C/C++(1696)

I used to solve this issue, but it just comes once again.

I have searched, but they don't work..

Also, I wonder when clicking run, is it normal to have

bash: cd: d:\DINO\code\pong" && g++ pong.cc -o pong && d:DINOcodepong"pong: No such file or directory

in the Code terminal and we need to manually compile it with g++, rather than VS Code done that for us, while in bash there's no this error?

Thank you for any help.

1 Answers

I've solved the include problem by watching this.

I pasted the mingw64\lib\gcc\x86_64-w64-mingw32\8.1.0 to the includePath, mingw64\bin\g++.exe to the complierPath, modified all \ to \\, followed instructions from vs code output, and the error just disappeared!

Related