💻

Setting Up Code-Input-Output Interface in VS Code

Jun 27, 2024

Setting Up Code-Input-Output Interface in VS Code

Introduction

  • The focus of this video is to set up a code-input-output interface in VS Code.
  • Code runs on left, input in the middle, and output on the right.

Striver's A to Z DSA Course

  • World's most in-depth DS algo course
    • 455 modules, premium quality articles
    • Covers C++, Java, JavaScript, Python
    • Targets companies like Google, Amazon, Facebook, etc.
    • Pseudocode approach, not language dependent
    • Initial videos in C++ for loops and basics

Setting Up in VS Code

For C++

  1. Open VS Code
    • Open a folder for C++ files.
  2. Install C++ Extension
    • Search for and install Microsoft's C++ extension.
  3. Create Necessary Files
    • demo.cpp
    • input.txt
    • output.txt
  4. Set Editor Layout
    • Split editor: View -> Editor Layout -> Split Left
    • Move input.txt and output.txt to right
    • Split down: View -> Editor Layout -> Split Down
  5. Configure Tasks
    • Terminal -> Configure Tasks -> Create Task
    • Choose 'Others', remove default config, and paste provided config
    • Save and close tasks.json
  6. Running the Code
    • Provide input
    • Use command Cmd+Shift+B to run
    • Output will appear in output.txt

For Java

  1. Open VS Code
    • Open a Java folder.
  2. Install Java Extension Pack
    • Locate and install Java Extension Pack.
  3. Create Necessary Files
    • demo.java
    • input.txt
    • output.txt
  4. Set Editor Layout
    • Split editor: View -> Editor Layout -> Split Left
    • Move input.txt and output.txt to right
    • Split down: View -> Editor Layout -> Split Down
  5. Configure Tasks
    • Terminal -> Configure Tasks -> Create Task
    • Choose 'Others', remove default config, and paste provided config
    • Save and close tasks.json
  6. Running the Code
    • Provide input
    • Use command Cmd+Shift+B to run
    • Output will appear in output.txt

Additional Resources

  • For Python and JavaScript setups, refer to provided blog links.
  • Use ChatGPT for assistance with configurations.

Final Notes

  • Check out the Striver's A to Z DSA course for comprehensive preparation.
  • Explore projects on Crio.do to build a strong portfolio.
  • Stay connected on social media for updates.