{"id":18706549,"url":"https://github.com/maruf-pfc/vscode-setup-env-for-cp","last_synced_at":"2025-10-15T21:24:01.767Z","repository":{"id":258869156,"uuid":"875824897","full_name":"maruf-pfc/vscode-setup-env-for-cp","owner":"maruf-pfc","description":"VSCode Setup Environment for Competitive Programming","archived":false,"fork":false,"pushed_at":"2024-10-20T23:18:07.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T06:38:43.962Z","etag":null,"topics":["competitive-programming","cp","editorsetupforcp","sublime-alternative","vscodesetupforcp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maruf-pfc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-20T23:06:54.000Z","updated_at":"2024-11-20T08:49:27.000Z","dependencies_parsed_at":"2024-10-21T03:21:40.356Z","dependency_job_id":null,"html_url":"https://github.com/maruf-pfc/vscode-setup-env-for-cp","commit_stats":null,"previous_names":["maruf-pfc/vscode-setup-env-for-cp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maruf-pfc/vscode-setup-env-for-cp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruf-pfc%2Fvscode-setup-env-for-cp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruf-pfc%2Fvscode-setup-env-for-cp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruf-pfc%2Fvscode-setup-env-for-cp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruf-pfc%2Fvscode-setup-env-for-cp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maruf-pfc","download_url":"https://codeload.github.com/maruf-pfc/vscode-setup-env-for-cp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maruf-pfc%2Fvscode-setup-env-for-cp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272467936,"owners_count":24939648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["competitive-programming","cp","editorsetupforcp","sublime-alternative","vscodesetupforcp"],"created_at":"2024-11-07T12:14:30.254Z","updated_at":"2025-10-15T21:23:56.732Z","avatar_url":"https://github.com/maruf-pfc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VSCODE Setup Environment for Competitive Programming\n\n```markdown\n# VSCode Tasks for C++ Compilation and Execution\n\nThis project uses a `tasks.json` file in Visual Studio Code to streamline the process of compiling and running C++ programs. Below is a breakdown of the tasks and how to use them.\n\n## Prerequisites\n\n- **g++**: Ensure that `g++` is installed on your system to compile C++ programs.\n  You can install it using the following command:\n  ```bash\n  sudo apt install g++\n  ```\n\n- **Visual Studio Code**: You should have VSCode installed with the C++ extensions for syntax highlighting and better development experience.\n\n- **input.txt**: This file should exist in the same directory as your C++ file if you want to redirect input during execution.\n\n## Tasks Overview\n\nThe `tasks.json` provides two tasks: one for compiling the C++ code, and another for compiling and running it in one step.\n\n### 1. Compile Task\n\n- **Label**: `compile`\n- **Command**: This task compiles the currently open C++ file using the following command:\n  ```bash\n  g++ -std=c++17 -o \u003cfilename without extension\u003e \u003cfile path\u003e\n  ```\n  - **Input**: The open C++ file in the editor.\n  - **Output**: An executable file with the same name as the C++ source file (but without the `.cpp` extension).\n\n#### How to Use:\n1. Open your `.cpp` file in VSCode.\n2. Press `Ctrl+Shift+B` and select the `compile` task.\n3. The compiled executable will be created in the same directory as your source file.\n\n### 2. Compile and Run Task\n\n- **Label**: `compile and run`\n- **Command**: This task compiles and then runs the program, redirecting input from `input.txt` and outputting to `output.txt`.\n  ```bash\n  g++ -std=c++17 -o \u003cfilename without extension\u003e \u003cfile path\u003e \u0026\u0026 ./\u003cfilename without extension\u003e \u003c input.txt \u003e output.txt\n  ```\n  - **Input**: The currently open `.cpp` file in the editor, and `input.txt` if present.\n  - **Output**: The output will be saved to `output.txt` in the same directory as the C++ file.\n\n#### How to Use:\n1. Open your `.cpp` file in VSCode.\n2. Make sure you have an `input.txt` file in the same directory.\n3. Press `Ctrl+Shift+B` and select the `compile and run` task.\n4. The program will be compiled and executed, with input read from `input.txt` and output written to `output.txt`.\n\n## Notes\n\n- **File Paths**: This `tasks.json` file handles file paths with spaces (e.g., directories like `Programming for Career`), so ensure that your project files are structured correctly.\n- **Input/Output Redirection**: The program expects `input.txt` to be present for input redirection. You can modify the task for different input/output needs.\n\n## Troubleshooting\n\n- **No such file or directory**: Ensure that the paths in the `input.txt` and `output.txt` files are correct.\n- **Compile Errors**: Check that your C++ code does not contain syntax errors by looking at the terminal output when running the `compile` task.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaruf-pfc%2Fvscode-setup-env-for-cp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaruf-pfc%2Fvscode-setup-env-for-cp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaruf-pfc%2Fvscode-setup-env-for-cp/lists"}