Follow this steps to get this type of setup with vsCode.
1. Install vsCode
2. Download mingw-w64 http://mingw-w64.org/doku.php/start
3. Install mingw-w64 in c drive as the location is like this C:\mingw-w64.(install on c:\)
4. Open this link in browser https://code.visualstudio.com/docs/cp...
5. Follow the instructions. Copy necessary commands and past on task.json , launch.json and c_cpp_properties.json.
6. Create a folder and in it create 3 files Sth.cpp, input.in and output.in.
7. #ifndef ONLINE_JUDGE
freopen("input.in", "r", stdin);
freopen("output.in", "w", stdout);
#endif
add this line to your code. This will redirect the input from input.in and output will show on output.in .
8. Install Extensions from extension store.
a. c/c++ by microsoft
b. code runner
c. bracket pair colourizer(optional)
d. prettier(optional)
9. Click and drag input.in file to right upper corner and output.in in right down corner
10. Write your code and include step 7's code in your int main function
11. Press ctrl+alt+n to compile and run (input needs to be given before compiling in input.in file)
12. To debug your code set a break point and press f5. Then f10 to execute next line.
13. File- preferences-user snippet. To make snippets
https://snippet-generator.app/?descri...
Here is my snippet https://pastebin.ubuntu.com/p/yGgTkxd...
Auf dieser Seite können Sie das Online-Video vsCode Setup for Competitive Programming for cpp/c++ in windows 10. Live input output system. mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Sourav Ahmed 19 Mai 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,061 Mal angesehen und es wurde von 12 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!