When i try to run the file it shows The preLaunchTask 'C/C++: g++.exe build active file' terminated with exit code 1 then there are two error messages along with it along with the error box
I tried to run my c++ file but it showed this error. There are no launch.json files being made and my task.json is empty. The testin.exe is present in the same folder as the testin.cpp file still its showing that the file does not exist
The error is coming during the debugging time the task.json file also is empty with no configuration. no json file is created on its own for example settings.json. i tried installing and reinstalling mingw and msys2 but nothing worked. there are similar questions in here but none of them are same to what this is and those solutions are not working in my laptop.
{"version": "0.2.0","configurations": [ {"name": "(gdb) Launch","type": "cppdbg","request": "launch","program": "C:/Users/Ali nawaz khan/OneDrive/Desktop/dfgh/testin.exe","args": [],"stopAtEntry": false,"cwd": "C:/Users/Ali nawaz khan/OneDrive/Desktop/dfgh","environment": [],"externalConsole": true,"MIMode": "gdb","miDebuggerPath": "C:/msys64/ucrt64/bin/gdb.exe","setupCommands": [ {"description": "Enable pretty-printing for gdb","text": "-enable-pretty-printing","ignoreFailures": true } ],"preLaunchTask": "build" } ] }
this code is usually not present in the launch.json but online resourses said to put it in as the file should not be empty like this
{"version": "0.2.0","configurations": [] }