Skip to content

Instantly share code, notes, and snippets.

@harsh9539
Created January 28, 2024 18:56
Show Gist options
  • Save harsh9539/3f9a0846eb3587966702943c272123c5 to your computer and use it in GitHub Desktop.
Save harsh9539/3f9a0846eb3587966702943c272123c5 to your computer and use it in GitHub Desktop.
tasks.json for cpp input output configure in mac
{
"version": "2.0.0",
"tasks": [
{
"label": "compile",
"type": "shell",
"command": "g++",
"args": [
"-std=c++17",
"-o",
"${fileBasenameNoExtension}",
"${file}"
],
"group": {
"kind": "build",
"isDefault": false
}
},
{
"label": "compile and run",
"type": "shell",
"command": "g++ -std=c++17 -o ${fileBasenameNoExtension} ${file} && ./${fileBasenameNoExtension} < input.txt > output.txt",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment