Dowload the two Extensions mentioned below
i) C/C++ by Microsoft ii) Code Runner by Jun Han
Go to below path and {Enable:"Run Code in Terminal"}
File-->Preferencs-->Settings-->Extensions-->Run Code config-->{Enable}
Press Ctrl+Shift+P and type "Tasks: Configure tasks" it will open tasks.json
Press Ctrl+Shift+D, then Click on Green Icon(start debugging) and choose "C++ (GDB/LLDB)". It will open lauch.json
Use the configured files launch.json
and tasks.json
from above folder .vscode
Press Ctrl+` to use terminal.
Complile: g++ filename.cpp and Run: ./a.exe. Also, Debugging is enabled(Ctrl+Shift+D)