How to install and setup vs code for competitive programming with c/c++ for Windows Users
install vs code
Download vs code ...
For further actions, you may consider blocking this person and/or reporting abuse
Hey. Thanks for this nice guidelines. I'm getting below error. Can you please help ?
Recently i have added some changes for windows hope this will help. Please check this out
github.com/jspw/VS-Code-Config/iss...
Hmm. I moved the cpp file in there own folder as mentioned in the link. But still no luck :(
give me a ss of your base folder
attached
dev-to-uploads.s3.amazonaws.com/i/...
did you change the task.json file try this as i have said that i make some edits.
I can see your last commit is 4 days ago. I'm using the recent one. Still not working. Do I need to use the older one ?
Note : Make sure your mouse cursor is clicked or focused on the cpp file editor while you are running your code or
pressing control+shift+b
The error you are facing must be solved using the updated task.json file for windows.
I'm focusing the file while running it. Also I'm using the latest file.
dev-to-uploads.s3.amazonaws.com/i/...
With closer look on the error. I feel like git shell in not converting file path properly.
${file} -> d:\extra\cpp\cod\hello.cpp (I guess this one not converting well. Notice the directory name case)
${workspaceFolder} -> D:\extra\cpp (Correct one)
I figured it out. Problem was same. Git shell was not recognizing the path. The path parameter should be in quotes. Below is the fix.
In args, make these changes.
thats great if you have figured it out but i have tested my previous task.json file and it is working fine with other machines!
I think windows have some issues with file management system though its all working file in Linux.
I had same problems too. After adding extra ( ' ' ) made it successful suggested by kikit.
Thanks.
Most welcome.
I will check it and will update the repo
this modification in task.json is working with git bash
Your .json file link is not working, I got my work stoped in between due to that !!!
Did you use this one ?
these tasks.json will be only valid for this folder and its subfolder only ?
not like that. Let me see you this
for different workspaces you have to make the tasks.json file once.
What do u mean setup vim??
This is what I'm getting...
what is your default shell in this vscode space ?
It is showing hello.cpp : No such file or directory
and also fatal error no input files
can you please help??
did you create input.txt in the same directory as the hello.cpp??
Will is save out code in github repo also ?
Yes thank you so much I just learned that I did not create a folder in the base folder and then the file.cpp.
This worked.
Please someone help me out as this is not working in my vscode
I am getting this error,any help is greatly appreciated
Try this it will work..You just have to mention where this 'jspwTest.exe/cpp' file will be present.