I am using vscode to solve usaco related problems.
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<vector<int>> v;
pair<int, int> p;
auto [l, r] = p;
std::cout << "This code worked";
}
From this code, I get these errors:
I tried many things to fix this. Here are my C/C++ configurations:
Here is my tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-std=c++17",
"-stdlib=libc++",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
},
]
}
Can anybody help me fix my issue? Anything helps, like what to try, etc.