I am a beginner at using VS code. I tried to run a simple algorithm, but it was difficult.
I get errors:
launch: program ‘/Users/#####/Desktop/C++College/C++HW/main’ does not exist
And
The preLaunchTask ‘C/C++: clang build active file’ terminated with exit code -1.
I have no idea what is wrong, It is a simple program, and I don’t understand what configurations are missing. I use Mac
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "enter program name, for example ${workspaceFolder}/a.out",
"MIMode": "lldb"
}
]
}
and my main
#include <iostream>
#include <string>
using namespace std;
int main() {
string cars[4] = {"Volvo", "BMW", "Ford", "Mazda"};
cars[0] = "Opel";
cout << cars[0];
return 0;
}