vsCode Setup for Competitive Programming for cpp/c++ in windows 10. Live input output system.

Pubblicato il: 19 maggio 2020
sul canale di: Sourav Ahmed
1,061
12

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...


In questa pagina del sito puoi guardare il video online vsCode Setup for Competitive Programming for cpp/c++ in windows 10. Live input output system. della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Sourav Ahmed 19 maggio 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,061 volte e gli è piaciuto 12 spettatori. Buona visione!