How to setup VS code for DSA and CP | Input / Output split format

  Рет қаралды 751,277

take U forward

take U forward

Күн бұрын

Пікірлер: 699
@karanshah3818
@karanshah3818 Жыл бұрын
for windows users : it will not work if your default terminal is Powershell make it cmd then it will work. to change default terminal : press->clt+shift+p->write:default terminal->change it to cmd.
@AbjSir
@AbjSir Жыл бұрын
Brother mera ye option hi nhi aa rha h what should I do? ctrl shift p me ye wala option hi nhi aa rha EDIT : fix ho gaya for anyone facing same problem, go to terminal on top -> new terminal -> click on the down arraw button just besides the + button, there you can find select default profile then do what Karan has told above Thanks Karan for helping me, Was stuck on this for half an hour 😅😅
@karanshah3818
@karanshah3818 Жыл бұрын
@@AbjSir your welcome brother!
@avakashrajkonwar
@avakashrajkonwar Жыл бұрын
​@@AbjSirbhai default terminal karke option nahi dikhara, power shell, git bash, command prompt ye sab dikharahe options me, kidar exactly click Karu?
@AbjSir
@AbjSir Жыл бұрын
@@avakashrajkonwar Command propt hi cmd hota h bro
@avakashrajkonwar
@avakashrajkonwar Жыл бұрын
@@AbjSir bhai mene select default profile pe click karke command prompt click Kia, lekin bro woh write:default terminal-> change it to cmd. Type kahape karu coz terminal me error dikharahe, CPP code bhi ruk karahu toh -1 se exit code ka error aarahe
@soumi6720
@soumi6720 11 ай бұрын
how is he so underrated? He has undoubtedly best coding content one can access for free in youtub
@shesparks64
@shesparks64 Жыл бұрын
This is really the best DSA course completely indepth ...insanely incredible
@rajeshr-0605
@rajeshr-0605 Жыл бұрын
In which video i watch to start DSA course?
@rajeshr-0605
@rajeshr-0605 Жыл бұрын
Are you finished DSA course? Can you reply quickly?
@sarathetanjul
@sarathetanjul Жыл бұрын
Great tip Striver bhaiya but those who don't want to do these much set-up they can just install one chrome extension "CPH for Competitive programmers" this extension will automatically access test case and run it for all test case in your VS code system.
@Akash-yr2if
@Akash-yr2if Жыл бұрын
After Solving 200+ Sheet question & Several Contest - This VS code installation is all we needed
@ImranOnTheWeb
@ImranOnTheWeb 5 ай бұрын
Which ide you used before
@Akash-yr2if
@Akash-yr2if 5 ай бұрын
@@ImranOnTheWeb Abb kuch nehi karta, wait karta hu
@rathore3991
@rathore3991 4 ай бұрын
​@@Akash-yr2ifkya karta ho bhai!
@Akash-yr2if
@Akash-yr2if 3 ай бұрын
@@rathore3991 Abhi Job karta hu
@ashwin159
@ashwin159 6 күн бұрын
@@rathore3991 still waiting for his reply
@senseiAree
@senseiAree Жыл бұрын
Thanks a lot Striver for the LL videos in the A2Z DSA Series... really enjoying the videos. You're the GOAT
@saitejareddy6495
@saitejareddy6495 Жыл бұрын
I cannot see them. is LL playlist for members only ?
@ashmi1237
@ashmi1237 Жыл бұрын
Bhaiyya Thank you so much for your A2Z dsa sheet. I am a ECE 2023 graduate and i love coding I started my dsa journey 2 week ago but i am in stuck to do which kinds of problems do i need to do. There comes your your sheet. Even though i am doing dsa in python i have fundamentals in C++ so while you doing c++ i tried to do that code in python .So it is very beneficial for me to understand the language difference. Once again thank you so much. I have more way to go through your sheet . Please bless me 😊
@Jithendra-q6h
@Jithendra-q6h 20 күн бұрын
I got excited reading your story. I'm just starting the course. Do you have any suggestions for me?
@BEYOND_DEATH
@BEYOND_DEATH 12 күн бұрын
where are you placed now brother?
@ag2791
@ag2791 Жыл бұрын
For windows users whose path contains spaces will face issues. Just paste the below code , its the same code with a minute change in line "command" Here is the corrected code { "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 } } ] }
@demigodlumine2353
@demigodlumine2353 Жыл бұрын
this helped me thanks!!
@Avenger-l3g
@Avenger-l3g Жыл бұрын
for java?
@ag2791
@ag2791 Жыл бұрын
@@Avenger-l3g bro u can ask to AI regarding this Ask either ChatGPT or Bard to convert this code for java
@art_of0
@art_of0 Жыл бұрын
Thanks Buddy It Worked 😍
@KendoBeats-yy3uy
@KendoBeats-yy3uy Жыл бұрын
This did help me out! Thanks!
@SaptadeepDutta_Ex-Xerox
@SaptadeepDutta_Ex-Xerox 8 ай бұрын
[IF ANYONE WANTS TO KNOW WHAT'S HAPPENING] This video is awesome! Just wanted to break down what's happening behind the scenes: The trick is to use tasks.json to redirect the default input stream to cin. Notice the command line options uses '' for output.txt. Those are actually compiler flags for g++! Super cool trick. 👍 For reference, see the value of tasks[1]["command"] in tasks.json at line 22 visible at the 5:21 mark in the video. I am just adding context to the magic! Thanks again for sharing.
@garenafreefire1936
@garenafreefire1936 7 ай бұрын
I followed the steps as mentioned in the video but still i did not get the output
@garvnagpal3722
@garvnagpal3722 28 күн бұрын
Best series on youtube for DSA
@AndrewWang-ct8hm
@AndrewWang-ct8hm 7 күн бұрын
Really excited for this DSA series #Day1
@studynewthings1727
@studynewthings1727 Жыл бұрын
I belong to Python Community. Thankyou Stiver, know the life is sorted. I use to type multiple inputs by running code again and again.
@studynewthings1727
@studynewthings1727 Жыл бұрын
@@DEEKSHITH-bw6bo now I shifted to web development. But if you re-watch the complete video you will definitely find the solution to your problem.
@ImranOnTheWeb
@ImranOnTheWeb 5 ай бұрын
Are you a college Student or doing job?
@studynewthings1727
@studynewthings1727 5 ай бұрын
@@ImranOnTheWeb I am the college student.
@ImranOnTheWeb
@ImranOnTheWeb 5 ай бұрын
@@studynewthings1727 which year brother
@BiswajitDas-fj5gp
@BiswajitDas-fj5gp Жыл бұрын
I am so much grateful to you for this video. I want it for the last few days. Many many many thanks.🥰🥰🥰🙏
@VatsalJain-jp5ux
@VatsalJain-jp5ux Жыл бұрын
Bhaiya I'm in my 2nd year of college and its a tier 3 one , so most of us students depend on your DSA videos .. bhaiya we are really really respectful and grateful to you for your service ... And hope you will continue to do your best in everything 👍👍👍 bhaiya I wanted to ask that when will you be uploading the articles attached with the questions provided and Videos which are pending right now ?? Like is there a 1 week uploading thing or something ?? please reply to this comment coz many of us are waiting for the answer. If any viewers or Bhaiya yourself find this rude then I'm very very sorry ... coz I know that working + making videos is hectic work but just asking coz many of us dont know
@ADITYA_138
@ADITYA_138 11 ай бұрын
Isme c++ bhi padhya hai na ? Pls tell? Merko c++ 0 aya hai basic se karya hai na?
@SauravSingh-xm6nn
@SauravSingh-xm6nn 8 ай бұрын
ham tier 1 wale ko v jaroorat pdti hai bhai
@KoushikDasMagnate2005
@KoushikDasMagnate2005 Жыл бұрын
Thanks Striver for sharing this ! It was of great help .
@Roheswaran.S
@Roheswaran.S 16 күн бұрын
Thank You is not enough for you , You are the Real meaning of Striver!
@PrithaMajumder
@PrithaMajumder 10 ай бұрын
Thanks a lot, Raj for This Amazing Lecture... 🙂
@Noob_Driverr
@Noob_Driverr 2 ай бұрын
So, yeah for me, it wasn't as simple as that but the AI ChatGPT, helped a lot. In my case, the code was compiling and running if both are done separately, Ctrl + Shift + B compiled the program and Ctrl+Shift+P > Run tasks > Run with input or output used to put the output in Output.txt. ChatGPT said the following steps, will work according to the case that C++ file is main.cpp ,input file is input.txt ,and output file is output.txt 1. Create the file build_and_run.bat and write the prompt in it @echo off g++ main.cpp -o main.exe main.exe < input.txt > output.txt 2. Next, change the json prompt to the following: { "version": "2.0.0", "tasks": [ { "label": "Compile and Run with Input and Output", "type": "shell", "command": "${workspaceFolder}\\build_and_run.bat", "group": { "kind": "build", "isDefault": true }, "detail": "Compiles and runs the program with input redirection and writes output to output.txt" } ] } The next time you use Ctrl + Shift + B, it will compile and run too. Hope it helps 👍
@pramodshettiwar9732
@pramodshettiwar9732 Жыл бұрын
00:04 Setting up VS code for DSA and CP 01:07 Setting up VS code for C++ 02:11 Setting up VS code for DSA and CP 03:22 Build a strong portfolio with projects and DS algo for placements. 04:24 Setup VS code for DSA and CP 05:31 Setting up VS code for DSA and CP is easy. 06:40 Set up VS code for DSA and CP 07:53 Setting up VS code for DSA and CP
@S3aw0lf
@S3aw0lf Жыл бұрын
I was setting up VSCode just yesterday and faced difficulty omg and this vid comes out today ❤
@abhinavpandey840
@abhinavpandey840 8 ай бұрын
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command g++ -std=c++17 -o "demo" "C:\Users\Dell\OneDrive\C++\demo.cpp" && .\demo < input.txt > output.txt" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it. Those who are getting this type of problem , you are doing a mistake as you are running in windows powershell terminal and not in command prompt terminal and in new version of vs code you cannot change your default terminal as shown by other youtubers, for changing try following this steps: 1: Go to setting icon of vs code in lower left corner. 2: Go to setting option (where shortcut is showing ctrl+,). 3:search for default terminal. 4: here select the *default terminal profile for Windows* and change it to command prompt. *NOTE* : You need to change from workspace (it is just below the search bar where you had type default terminal) ,if you change from user side it will not change ,also it was the error from the beginning because you were changing default terminal from the user side and not the workspace side
@akshaybhardwaj7096
@akshaybhardwaj7096 8 ай бұрын
bro even after doin this i am getting this again- * Executing task: g++ -std=c++17 -o "demo" "C:\Users\HP\Desktop\C++\demo.cpp" && .\demo < input.txt > output.txt 'g++' is not recognized as an internal or external command, operable program or batch file. * The terminal process "C:\WINDOWS\System32\cmd.exe /d /c g++ -std=c++17 -o "demo" "C:\Users\HP\Desktop\C++\demo.cpp" && .\demo < input.txt > output.txt" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
@ayushpandey4013
@ayushpandey4013 8 ай бұрын
It's showing that The syntax of the command is incorrect
@C0medyKing
@C0medyKing 7 ай бұрын
@@akshaybhardwaj7096 i also face the same problem , can anyone gave me the right solution
@garenafreefire1936
@garenafreefire1936 7 ай бұрын
Pls help its showing like this Executing task: copy "C:\Users\PRANAV\Desktop\demoo\.vscode\tasks.json" C:\Users\PRANAV\Desktop\demoo\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.txt > output.txt && del jspwTest.exe && del jspwTest.cpp 1 file(s) copied. jspwTest.cpp:1:1: error: expected unqualified-id before '{' token { ^ * The terminal process "C:\windows\System32\cmd.exe /d /c copy "C:\Users\PRANAV\Desktop\demoo\.vscode\tasks.json" C:\Users\PRANAV\Desktop\demoo\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.txt > output.txt && del jspwTest.exe && del jspwTest.cpp" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
@vanishjain2975
@vanishjain2975 6 ай бұрын
Thanks bro , it Worked!!
@6.squash.936
@6.squash.936 Жыл бұрын
Thank you Striver for making this course Language Independent , I am following the course in JavaScript only problem I have is that sometimes the codeStudio links you provide the platform doesn't have a Javascript Compiler but LeetCode has but anyways I code on Vscode now.
@takeUforward
@takeUforward Жыл бұрын
Getting it fixed soon
@mod_cyber1015
@mod_cyber1015 Жыл бұрын
hey, i am also starting with js as well. Any guide or any other resource which will be better. Please share
@okkk-gt8tb
@okkk-gt8tb 5 ай бұрын
@@mod_cyber1015 hey,any resources you got in js ?
@confident_winner
@confident_winner Ай бұрын
5:09 I don't have the "Create tasks.json file from template." option. Any fix? Edit: I found the solution, there is a direct file tasks.json in the .vscode file. Just show hidden files and you will find it.
@AnonymousHacker-gw8pn
@AnonymousHacker-gw8pn 10 ай бұрын
c++ setup not working for windows, getting "The syntax of the command is incorrect."
@omkarmandal8138
@omkarmandal8138 6 ай бұрын
Review: Too Good to be free. This Man is Educating India for free.
@vinitsingh5406
@vinitsingh5406 Жыл бұрын
Most awaited video. Thank you Bhaiya !!
@arjunflix
@arjunflix Жыл бұрын
Replace the following line "${workspaceFolder}\\jspwTest.cpp", with "\"${workspaceFolder}\\jspwTest.cpp\"", if output is not generating
@milindchaturvedi9770
@milindchaturvedi9770 11 ай бұрын
WORKS ! DAMN thanks so much
@gada.shreebh
@gada.shreebh 10 ай бұрын
Thanks a lot. Working just like that.
@_Phanindrak_
@_Phanindrak_ 10 ай бұрын
Not working pls help
@gada.shreebh
@gada.shreebh 10 ай бұрын
​​@@_Phanindrak_ see the pinned comment in this video, for windows user make the default terminal to cmd
@_Phanindrak_
@_Phanindrak_ 10 ай бұрын
@@gada.shreebh i did it but output is not comping pls help
@thefourhourtalk
@thefourhourtalk Жыл бұрын
after almost wasting 50 hours on dsa in youtube I got you sir your explanation was just wowwww
@abhinan6u
@abhinan6u Жыл бұрын
this is what i was searching for.....thanku bayya
@anuragk10
@anuragk10 6 ай бұрын
Kindly solve this problem when i run this code at timeline - 5:40. Executing task: g++ -std=c++17 -o demo g++: fatal error: no input files compilation terminated. * The terminal process "C:\windows\System32\cmd.exe /d /c g++ -std=c++17 -o demo" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
@yashdewani5377
@yashdewani5377 5 ай бұрын
same
@ultimatescience3842
@ultimatescience3842 Жыл бұрын
Are the videos arranged in a sequential manner in A2Z playlist? I am learning c++ right now and will be doing dsa from your playlist. Also, when will that course be completed?
@iamritam
@iamritam Жыл бұрын
Yes, it's in sequence. You will find everything topic-wise.
@ultimatescience3842
@ultimatescience3842 Жыл бұрын
​@@iamritam Bro can you please tell me how much he has covered till now? And what percentage of the course is still left?
@Mickey_ej
@Mickey_ej Жыл бұрын
@@ultimatescience3842 In his current updated playlists he has covered till Binary Search hard, there are video solutions for advanced topics as well, from his old videos.
@Engineeringgod-z4h
@Engineeringgod-z4h 10 күн бұрын
am i going to get the error message from the code like runtime aur compile time error message
@YogisInsights
@YogisInsights 5 ай бұрын
Note: It is checked verified method still if there is any minute trouble do ask me or ChatGPT like ai tools. Day 1: Introduction to DSA and Environment Setup Download the vs code required extensions then set-up your ide Day 1: Setting Up Your IDE Like a Pro Introduction When starting your coding journey, having an organized environment can significantly boost your productivity and ease the debugging process. Today, we’ll walk you through setting up your IDE using a JSON file to manage your coding files, input, and output separately. We’ll cover setups for Java, C++, and Python. Step 1: Why Use a JSON File? Using a JSON file to organize your projects helps in keeping your code, input, and output files separate, making it easier to manage and test your programs. It also allows for easy switching between different languages and projects. Step 2: Creating Your Project Structure (It can vary on every individual this is just an example) First, let’s create a directory structure: bash Copy code /my_project ├── code/ │ ├── main.cpp (or main.java, main.py) ├── input/ │ ├── input.txt ├── output/ │ ├── output.txt ├── config.json • code/: This folder contains your main source code file. • input/: Place your input files here. • output/: Your program’s output will be stored here. • config.json: This file will manage the paths and commands for running your program. Step 3: Writing the JSON Configuration Note : for windows users : it will not work if your default terminal is Powershell make it cmd then it will work. to change default terminal : press->clt+shift+p->write:default terminal->change it to cmd Create a config.json file in your project directory. C++ : { "version": "2.0.0", "tasks": [ { "label": "Compile and run C++", "type": "shell", "command": "g++", "args": [ "-std=c++17", "-O2", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe", "&&", "${fileDirname}\\${fileBasenameNoExtension}.exe", "", "output.txt", "&&", "del", "${fileDirname}\\${fileBasenameNoExtension}.exe" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": ["$gcc"] } ] } For Java: { "version": "2.0.0", "tasks": [ { "label": "Compile and run Java", "type": "shell", "command": "javac", "args": [ "${file}", "&&", "java", "-cp", "${fileDirname}", "${fileBasenameNoExtension}", "", "output.txt" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": ["$javac"] } ] } Python: { "version": "2.0.0", "tasks": [ { "label": "Run Python", "type": "shell", "command": "python", "args": [ "${file}", "", "output.txt" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": ["$python"] } ] } These configurations will work for their respective languages, using input.txt for input and writing to output.txt for output. Conclusion With this setup, you’ll have a neatly organized workspace where your code, input, and output are separated, making testing and debugging your programs easier. This structure is a best practice for professionals.
@debajyotichoudhury3103
@debajyotichoudhury3103 3 ай бұрын
Thanks
@shivaay3549
@shivaay3549 3 ай бұрын
05:20 Where is the configuration code ? Can anyone provide me that ?
@negigarv8298
@negigarv8298 2 ай бұрын
{ "version": "2.0.0", "tasks": [ { "label": "Compile and run", "type": "shell", "command": "", "args": [ "copy", "\"${file}\"", "${workspaceFolder}\\jspwTest.cpp", "&&", "g++", "jspwTest.cpp", "-o", "jspwTest", "&&", "jspwTest", "", "output.txt", "&&", "del", "jspwTest.exe", "&&", "del", "jspwTest.cpp" ], "presentation": { "reveal": "never" }, "group": { "kind": "build", "isDefault": true, }, "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "${workspaceRoot}" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ] }
@negigarv8298
@negigarv8298 2 ай бұрын
Take it
@tamalmazumder8476
@tamalmazumder8476 Ай бұрын
Thanks!!! Working like a Charm
@slighty5879
@slighty5879 7 ай бұрын
*OUTPUT NOT PRINTING ISSUE FIX IN WINDOWS* Step 1: Replace the following line "${workspaceFolder}\\jspwTest.cpp", with "\"${workspaceFolder}\\jspwTest.cpp\"", Step 2: 1: Go to setting icon of vs code in lower left corner. 2: Go to setting option (where shortcut is showing ctrl+,). 3:search for default terminal. 4: here select the default terminal profile for Windows and change it to command prompt.
@raghavgaur2782
@raghavgaur2782 5 ай бұрын
bhala kare bagwaan tera
@vishalcheeti8374
@vishalcheeti8374 5 ай бұрын
thanks alot bro
@sumansaha3502
@sumansaha3502 5 ай бұрын
Thanks a lottttt brother!!!
@gauravchandra9915
@gauravchandra9915 3 ай бұрын
mann thanks a lottt
@aniruddhashinde1822
@aniruddhashinde1822 2 ай бұрын
Thanks man !! this took me 1 whole hr to figure it out.
@shubhamagarwal1434
@shubhamagarwal1434 Жыл бұрын
Very nice explanation,God Bless You
@samparker5678
@samparker5678 Жыл бұрын
Sir I completed the setup but when I run the code jspwtest.cpp file occurs and output does not come. How to resolve this?? Please someone suggest
@aniketshaw323
@aniketshaw323 Жыл бұрын
did u get the solution
@manivignesh4621
@manivignesh4621 4 ай бұрын
Did solve it
@yogeshnain4251
@yogeshnain4251 Жыл бұрын
Thanks for sharing your knowledge buddy. 😊
@vaishnavi_346
@vaishnavi_346 5 ай бұрын
Hi, i had setup my vs code for c++ seeing your video for it, i have a few doubts: now my normal run code button doesnt run in cases where i need to give an input, secondly everytime for an output i have to write ctrl+shift+b?
@bhavyasharma3500
@bhavyasharma3500 Жыл бұрын
Thanks for such informative videos
@princechourasia3893
@princechourasia3893 Ай бұрын
you are awesome.....loved your videos
@aniketkumar6405
@aniketkumar6405 Жыл бұрын
Bhai thank u very much for this video 😊😊
@piyushsaxena7399
@piyushsaxena7399 Жыл бұрын
thanks a lot striver, really helpful for me
@aadilnarang3468
@aadilnarang3468 9 ай бұрын
when i press Ctrl + shift + B nothing happens ? what could be the reason?
@mayurtummewar3312
@mayurtummewar3312 10 ай бұрын
This works for Ubuntu too 🥳
@venom3380
@venom3380 4 күн бұрын
what did u chose for ubuntu mac or windows config?
@ishrakhamim
@ishrakhamim Жыл бұрын
I use windows 11. I have followed all the steps. But upon pressing ctrl+shift+b i get :" command syntex error" message in the terminal and bothing in output file. How can I fix it?
@radhekrishna2477
@radhekrishna2477 11 ай бұрын
Same
@shashankjha9734
@shashankjha9734 6 ай бұрын
please if u solve that issue then tell me
@harshtripathi-ql8yx
@harshtripathi-ql8yx Жыл бұрын
Please make the strings playlist as soon as possible.
@devanshsinghind
@devanshsinghind 7 күн бұрын
my mac does not have bits/stdc++.h how to add that??
@Chuchuchal
@Chuchuchal 10 күн бұрын
finally done hogaya 1st class hii adventure sei bara tha 😅 guys if you facing problem then simply say chech discription and read cearfully then you do thar
@hat_awesome21
@hat_awesome21 Жыл бұрын
bhaiya plz upload next series , eagerly waiting for linked list , greedy etc
@rz_rabbi
@rz_rabbi 11 ай бұрын
When I press ctrl+shift+B it showing me an error in jspwTest.cpp file. Error message: expected unqualified-id before numeric constant [Ln 1, Col 1].. expected a declaration C/C++(169) [Ln 1, Col 1]. Any solution?
@aspiringcodess
@aspiringcodess 5 ай бұрын
Same here, did it get resolve?
@pratulyapratap9329
@pratulyapratap9329 Жыл бұрын
Bhaisaab this video was so important 🥹🥹🥹🥹
@ar3568row
@ar3568row Жыл бұрын
the windows one is not working
@GaganSingh-zz9el
@GaganSingh-zz9el Жыл бұрын
same yaar nah ho rha hai @@ar3568row
@subhadeepmondal7738
@subhadeepmondal7738 Жыл бұрын
This is not working for c++ if i am reopening the c++ folder in vscode, it asks to select a build task to run , but even after selecting it does not work.The output does NOT change.
@aryankhare4031
@aryankhare4031 9 күн бұрын
terminal open up even aftr cmd + shift + b what can be done for this?
@jeet5205
@jeet5205 Жыл бұрын
Bahi apka A to Z series playlist kab tak khatam ho jayega Please playlist ko acche se sequence me thoda ready karna. Please respond me.
@dhamotz4737
@dhamotz4737 8 ай бұрын
i did the exactly same thing guys as told for mac but the bits extension file is showing erroe in my mac while running can someone tell me what I have done wrong?
@technicalupgrade7254
@technicalupgrade7254 Жыл бұрын
can someone help me I am getting this error "The syntax of the command is incorrect." in the terminal and I am not able to get any output in output.txt
@balu_zoro
@balu_zoro 10 ай бұрын
in tasks.json , under "tasks" then under "args" " the first text is set to "python3" i have removed the 3 and just made it "python" . then , its working for me
@radhekrishna2477
@radhekrishna2477 Жыл бұрын
i am starting today , let me see how much does it take to reach codeforces 2000 rating
@quanghuyluong1249
@quanghuyluong1249 3 ай бұрын
How's it going?
@anurag_ad_01
@anurag_ad_01 Жыл бұрын
getting this error pleaase help * Executing task: copy "C:\Users\anura\Desktop\C++\demo.cpp" C:\Users\anura\Desktop\C++\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.txt > output.txt && del jspwTest.exe && del jspwTest.cpp The syntax of the command is incorrect. * The terminal process "C:\WINDOWS\System32\cmd.exe /d /c copy "C:\Users\anura\Desktop\C++\demo.cpp" C:\Users\anura\Desktop\C++\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.txt > output.txt && del jspwTest.exe && del jspwTest.cpp" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
@pubglovers8306
@pubglovers8306 Жыл бұрын
same
@vineetsingh3985
@vineetsingh3985 10 ай бұрын
Try this tasks.json(C++): { "version": "2.0.0", "tasks": [ { "label": "Compile and run", "type": "shell", "command": "", "args": [ "copy", "\"${file}\"", "\"${workspaceFolder}\\jspwTest.cpp\"", "&&", "g++", "jspwTest.cpp", "-o", "jspwTest", "&&", "jspwTest", "", "output.txt", "&&", "del", "jspwTest.exe", "&&", "del", "jspwTest.cpp" ], "presentation": { "reveal": "never" }, "group": { "kind": "build", "isDefault": true, }, "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "${workspaceRoot}" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ] }
@_anujKaushik_
@_anujKaushik_ 6 ай бұрын
Thanks Raj bhaiya for this configuration file, it is working completely fine with some minor modification using chatgpt. But it stuck when I accidentally execute infinite loop. Can you tell how to add time limit for execution similarly like we have on competitive platforms.
@sadiquereyaz
@sadiquereyaz 6 ай бұрын
bro please reply when you'll get the solution.
@vinaysalve8009
@vinaysalve8009 Жыл бұрын
I am getting this error : * Executing task: copy "C:\Users\vinay\Documents\C++ ew.cpp" C:\Users\vinay\Documents\C++\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.txt > output.txt && del jspwTest.exe && del jspwTest.cpp ParserError: Line | 1 | … ++\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.t … | ~ | The '
@shydcuk
@shydcuk Жыл бұрын
same
@abhinan6u
@abhinan6u Жыл бұрын
same bro @@shydcuk
@karanshah3818
@karanshah3818 Жыл бұрын
in windows it will not work if your default terminal is powershell make it cmd then it will work.
@Bimplo-l6f
@Bimplo-l6f Жыл бұрын
​@@karanshah3818but it is still not working it is showing building for 10 min Did you do any changes in the code
@karanshah3818
@karanshah3818 Жыл бұрын
@@Bimplo-l6f i also faced this problem then i restarted vs code and it was working properly.
@VENUGOPALRAO-w8g
@VENUGOPALRAO-w8g Жыл бұрын
great video, is there any way to change the shortcut to run the code to something else?
@AbjSir
@AbjSir Жыл бұрын
Yes there is Go to keyboard shortcuts and search the shortcut which is already there I think ctrl shift p it is so search that shortcut, like just search ctrl shift p and change it to whatever you want I have changed it to Alt + X
@VENUGOPALRAO-w8g
@VENUGOPALRAO-w8g Жыл бұрын
@@AbjSir thanks, i got it now
@rahuldwivedi4758
@rahuldwivedi4758 Жыл бұрын
Where's that a2z course? There's no link in the description for that? 2:01
@subhadeepmondal7738
@subhadeepmondal7738 Жыл бұрын
if facing errpr while running the java file, go to tasks.json and change label a liitle bit ...suppose Compile and Run. In my case, it worked after doing this, earlier the cpp task file was always getting run in java also.
@superiors2817
@superiors2817 Жыл бұрын
Not working in my laptop (macbook). I hv tried multiple times. Also tried to modify the task accordingly using ChatGPT but didn't work. Unable to find the reason
@rajkumarchaudhary6783
@rajkumarchaudhary6783 7 ай бұрын
did you get any solution yet ?
@superiors2817
@superiors2817 7 ай бұрын
@@rajkumarchaudhary6783 yes brother, working fine basically i used the same template as provided, just insure that the path in which you have saved the folder or your cpp file, make sure the name of any folder should not contain spaces. For eg. if you have a folder named "abc def" make it "abc_def", that was the mistake i was doing, maybe helpful for you
@sauravraj2831
@sauravraj2831 Жыл бұрын
Thanks Striver 🙌 For C++ & JAVA was facing some errors of syntax in tas.json file on windows. Pasting working json This will dynamically take the file that is active and you are working and run that. { "version": "2.0.0", "tasks": [ { "label": "Compile and run", "type": "shell", "command": "cmd", "args": [ "/C", "g++ \"${file}\" -o \"${fileDirname}\\${fileBasenameNoExtension}\" && \"${fileDirname}\\${fileBasenameNoExtension}\" < \"${workspaceFolder}\\input.txt\" > \"${workspaceFolder}\\output.txt\"" ], "presentation": { "reveal": "never" }, "group": { "kind": "build", "isDefault": true }, "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "${workspaceRoot}" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ] } For those who want the same configuration for JAVA Make sure you have jdk installed and added in path { "version": "2.0.0", "tasks": [ { "label": "Compile and run Java", "type": "shell", "command": "cmd", "args": [ "/C", "javac \"${file}\" && java -cp \"${fileDirname}\" \"${fileBasenameNoExtension}\" < \"${workspaceFolder}\\input.txt\" > \"${workspaceFolder}\\output.txt\"" ], "presentation": { "reveal": "always" }, "group": { "kind": "build", "isDefault": true }, "problemMatcher": { "owner": "java", "fileLocation": [ "absolute" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ] }
@AyushKumar-xi8hd
@AyushKumar-xi8hd Жыл бұрын
Thanks a lot for helping ❤
@programmer545
@programmer545 Жыл бұрын
Thanks a lot for helping
@Yurii_99
@Yurii_99 Жыл бұрын
Thank you so much for this
@sheikhtahamaroof8484
@sheikhtahamaroof8484 Жыл бұрын
For some reason there is no tasks.json file in the description and also, the json config provided in striver's website is not working however I tried this json and it is working fine. Thanks for helping out. If anyone is struggling to setup can reply me I have fixed hell lot of stuff for this setup.
@armansingh.23
@armansingh.23 11 ай бұрын
@@sheikhtahamaroof8484 the configuration given by Striver is not working for me. What should I do?
@siby-tu6bj
@siby-tu6bj 3 ай бұрын
okay my output prints hey but my input 13 is not showing in output whats the reason?
@jainamsonigara8734
@jainamsonigara8734 2 ай бұрын
do we need to everytime press ctrl+shift+b or can you do that with just run button
@Tanishq_1803
@Tanishq_1803 4 ай бұрын
5:22 where is this code
@iabhisripathi
@iabhisripathi Жыл бұрын
Hi, Can anyone paste the task.json (C++) code for Windows, the one on the website doesn't work for me.
@vineetsingh3985
@vineetsingh3985 10 ай бұрын
try this one it is working: { "version": "2.0.0", "tasks": [ { "label": "Compile and run", "type": "shell", "command": "", "args": [ "copy", "\"${file}\"", "\"${workspaceFolder}\\jspwTest.cpp\"", "&&", "g++", "jspwTest.cpp", "-o", "jspwTest", "&&", "jspwTest", "", "output.txt", "&&", "del", "jspwTest.exe", "&&", "del", "jspwTest.cpp" ], "presentation": { "reveal": "never" }, "group": { "kind": "build", "isDefault": true, }, "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "${workspaceRoot}" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ] }
@hiteshbhartia734
@hiteshbhartia734 9 ай бұрын
I am having issues in setting up vs code. The output is coming in the terminal of vs code instead of the txt file I created. Can anyone help me with it.
@ujjwalagrawal9418
@ujjwalagrawal9418 4 ай бұрын
ld: file too small (length=1) file '/Users/ujjwalagrawal/Desktop/cpp/input.txt' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation). having this error in my mac setting the above setting can you explain, i tried evrything ...chatgpt also but culdnt understand...
@averylazyandweirdhuman
@averylazyandweirdhuman 7 ай бұрын
Striver, I am really slow while dry running the code and building the intuition. how can I improve that? How to think about edge cases?
@akhilesh33056
@akhilesh33056 5 ай бұрын
If you aren't findind that .json code in description, click on one of the links in description, there you will find it.
@ChandraShekar-gu9ul
@ChandraShekar-gu9ul Жыл бұрын
Not working for my windows giving error : The token '&&' is not a valid statement separator in this version
@Bimplo-l6f
@Bimplo-l6f Жыл бұрын
Same
@komal7981
@komal7981 Жыл бұрын
After pressing run it gives "demo.exe file does not exit". What changes should I make in my launch.json file to get the output???
@hardiksaxena7921
@hardiksaxena7921 8 ай бұрын
Sir I can't show output. Ctrl+shift+b is not working.
@rishidakoria9608
@rishidakoria9608 8 ай бұрын
i use ubuntu and its not working. i used chat gpt changed task.json file but still shows output in terminal but not in output file, also does not take input from input file
@miteshrajpurohit9033
@miteshrajpurohit9033 3 ай бұрын
i followed the same procedure after the ctrl+shift+built therer is two JspwTest.cpp and JspwTest.exe and hellowolrd.exe file is created but the output is not showing . my code is written in the helloworld.cpp please help me on it and i choose cmd as command prompt but i am unable to fix it please help on it
@AnishaSharma-f5w
@AnishaSharma-f5w Ай бұрын
i have the same problem bro pls help me if you have already done
@shravani_gulhane
@shravani_gulhane 2 ай бұрын
Tried doing for java but the output is shown on terminal but not output.txt I used tasks.json code provided in link for windows
@felucia.
@felucia. Жыл бұрын
Thanks brother :)
@AnkitChaudhary-zx1ob
@AnkitChaudhary-zx1ob 9 ай бұрын
how to stop exection when i stuck into a infinite loop??
@anmolbajaj111
@anmolbajaj111 9 ай бұрын
remove that loop
@pranjalagrawal9344
@pranjalagrawal9344 10 күн бұрын
ctr c
@rakshitshandilya9934
@rakshitshandilya9934 9 ай бұрын
Glad that it worked with a little help from gpt too.
@mohitkhadanga
@mohitkhadanga Жыл бұрын
I am having a small issue with the TUF website. The problems that I mark as "done" are not saved. When I reload the page or access it from another device, the updates are not reflected. Is it with everyone ?
@amanverma7375
@amanverma7375 Жыл бұрын
We can also install the competitve programming helper extension
@ankitakansra651
@ankitakansra651 Жыл бұрын
on my Mac, when i click on terminal, then configure task, after that i can't the option of 'Create tasks.json file from template', what to do now?
@guiltowner4605
@guiltowner4605 11 ай бұрын
Showing : The syntax of the command is incorrect. what should i do?
@syeedtalha1550
@syeedtalha1550 Жыл бұрын
Great work
@khushikapoor2341
@khushikapoor2341 9 ай бұрын
hi need help figuring out that i followed each and every step very carefully but still i get errors like the code ended with error and so on and i really cannot figure out anymore how to resolve the issue also there appeared to be no errors in the problems section this is the error that i get : The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command g++ -std=c++17 -o "demo" "C:\Users\Dell\OneDrive\C++\demo.cpp" && .\demo < input.txt > output.txt" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it. would appreciate any guidance
@Goutam-tr2ls
@Goutam-tr2ls 9 ай бұрын
I'm also having similar problem 😢
@abhinavpandey840
@abhinavpandey840 8 ай бұрын
you are doing a mistake as you are running in windows powershell terminal and not in command prompt terminal and in new version of vs code you cannot change your default terminal as shown by other youtubers, for changing try following this steps: 1: Go to setting icon of vs code in lower left corner. 2: Go to setting option (where shortcut is showing ctrl+,). 3:search for default terminal. 4: here select the default terminal profile for Windows and change it to command prompt. NOTE : You need to change from workspace (it is just below the search bar where you had type default terminal) ,if you change from user side it will not change ,also it was the error from the beginning because you were changing default terminal from the user side and not the workspace side
@abhinavpandey840
@abhinavpandey840 8 ай бұрын
i can tell you are running in powershell terminal because it is written in your path C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe (see you are running in powershell.exe) if you were ran this code in command prompt it had shown cmd.exe and striver bhaiya already said you have to run in command prompt terminal for working and not in powershell terminal
@garenafreefire1936
@garenafreefire1936 7 ай бұрын
​@@abhinavpandey840pls tell what to do Executing task: copy "C:\Users\PRANAV\Desktop\demoo\.vscode\tasks.json" C:\Users\PRANAV\Desktop\demoo\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.txt > output.txt && del jspwTest.exe && del jspwTest.cpp 1 file(s) copied. jspwTest.cpp:1:1: error: expected unqualified-id before '{' token { ^ * The terminal process "C:\windows\System32\cmd.exe /d /c copy "C:\Users\PRANAV\Desktop\demoo\.vscode\tasks.json" C:\Users\PRANAV\Desktop\demoo\jspwTest.cpp && g++ jspwTest.cpp -o jspwTest && jspwTest < input.txt > output.txt && del jspwTest.exe && del jspwTest.cpp" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
@VeryCurious773
@VeryCurious773 Жыл бұрын
oh my god i wanted this so much
@harshrkaushik
@harshrkaushik 5 ай бұрын
My input txt and output txt are integrated after i asked gpt for modified task.json but every time i have to press ctrl shift B for output updation can it be automated
@aayushrajpurohit321
@aayushrajpurohit321 11 ай бұрын
Why am I getting error after making changes in .json file, I am getting correct output but when I press Ctrl Shift B I get some error in compile and run.
@AnkitPatel-zc5yf
@AnkitPatel-zc5yf 10 ай бұрын
try this out { "version": "2.0.0", "tasks": [ { "label": "Compile and run", "type": "shell", "command": "cmd", "args": [ "/C", "copy \"${file}\" \"${workspaceFolder}\\jspwTest.cpp\" && g++ \"${workspaceFolder}\\jspwTest.cpp\" -o \"${workspaceFolder}\\jspwTest\" && \"${workspaceFolder}\\jspwTest.exe\" < input.txt > output.txt && del \"${workspaceFolder}\\jspwTest.exe\" && del \"${workspaceFolder}\\jspwTest.cpp\"" ], "presentation": { "reveal": "never" }, "group": { "kind": "build", "isDefault": true }, "problemMatcher": { "owner": "cpp", "fileLocation": [ "relative", "${workspaceRoot}" ], "pattern": { "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", "file": 1, "line": 2, "column": 3, "severity": 4, "message": 5 } } } ] }
@-SripathiNamrathaa
@-SripathiNamrathaa 9 ай бұрын
task.json code for javascript link was not provided in the description will you please provide it.
@magn8
@magn8 9 ай бұрын
It's in the website link.
@Codeitt
@Codeitt Жыл бұрын
Striver please make a playlist for STRINGS also.
@sibanandasahu2
@sibanandasahu2 Жыл бұрын
Heeeeeey Striver, thank you 💝
@User-i6v2g
@User-i6v2g Жыл бұрын
Is java certifition exam (OCJP) is important?? Please make one video on it
@parikshitrathore1510
@parikshitrathore1510 Жыл бұрын
No
@RudraKumarSharma-u9s
@RudraKumarSharma-u9s 6 ай бұрын
this setup is not working for me as a mac user idk why it just dont ask input and just print some random set of integers please someone help
@sushmitha_c7
@sushmitha_c7 Жыл бұрын
FOR MACBOOK, it'a not working: Exception in thread "main" java.util.NoSuchElementException at java.base/java.util.Scanner.throwFor(Scanner.java:945) at java.base/java.util.Scanner.next(Scanner.java:1602) at java.base..... The terminal process "/bin/zsh '-l', '-c', 'javac /Users/xxxxxxx/L4_Problems.java && java L4_Problems < input.txt > output.txt'" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
@sayamparejiya1510
@sayamparejiya1510 Жыл бұрын
great tip bhaiya.
C++ Basics in One Shot - Strivers A2Z DSA Course - L1
1:26:27
take U forward
Рет қаралды 1,7 МЛН
Time and Space Complexity - Strivers A2Z DSA Course
35:16
take U forward
Рет қаралды 770 М.
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
Complete C++ STL in 1 Video | Time Complexity and Notes
1:07:37
take U forward
Рет қаралды 1,3 МЛН
Re 5. Multiple Recursion Calls | Problems | Strivers A2Z DSA Course
16:45
L1. Introduction to LinkedList | Traversal | Length | Search an Element
45:17
Re 4. Problems on Functional Recursion | Strivers A2Z DSA Course
19:48
take U forward
Рет қаралды 616 М.
Don't watch my A2Z DSA Course
8:24
take U forward
Рет қаралды 1 МЛН
Re 2. Problems on Recursion | Strivers A2Z DSA Course
22:04
take U forward
Рет қаралды 795 М.
How to set up C++ in Visual Studio Code
6:53
Kenny Yip Coding
Рет қаралды 1,1 МЛН
Re 3. Parameterised and Functional Recursion | Strivers A2Z DSA Course
18:14
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН