+ 2

How can I run my cpp program in VS Code?

I've installed VS Code and also Mingw. I installed some extensions for C++ on VS Code too. But no matter what I do, my code will not run😬😬😬 Please help me

23rd Nov 2020, 2:21 PM
Ehsan
Ehsan - avatar
13 odpowiedzi
+ 2
Ehsan what error is it showing you? Since you are already able to work with python, you might have to set up a particular folder for Cpp especially the launch.json and the task.json. That's after you've set a bin folder in MinGW to path.
24th Nov 2020, 1:20 PM
Daniel Tobi Nyorere
Daniel Tobi Nyorere - avatar
+ 2
The error: Can not create temporary in C:\Users\fujitsu\Appdata\local\temp\:Permission denied
25th Nov 2020, 8:18 AM
Ehsan
Ehsan - avatar
+ 2
Hi When I typed these two commands (echo %TEMP% and echo %TMP%) the result of them were exactly the same.
28th Nov 2020, 7:31 AM
Ehsan
Ehsan - avatar
+ 1
No, I haven't. Actually I have logged in as Fujitsu so I can access the folder
26th Nov 2020, 1:44 PM
Ehsan
Ehsan - avatar
0
Thanks for answering But I'm sure that I have installed mingw correctly and I have checked ir
23rd Nov 2020, 3:00 PM
Ehsan
Ehsan - avatar
0
if you want to work with gcc sooner or later you need to learn how to write makefile. I find it difficult to use vs code for c/c++ development. I think you need to have a tasks.json to run cpp on vs code. CodeBlocks could be a better alternative.
23rd Nov 2020, 3:10 PM
Flash
0
Hi I know that Code::Blocks can be a better alternative than VS Code, but I've already installed VS Code on my PC and I use it to compile Python, HTML, CSS, javascript. I want to compile and run my C++ code in VS Code, and I don't want to install another software to compile each language
23rd Nov 2020, 3:28 PM
Ehsan
Ehsan - avatar
0
Thanks I will test it
23rd Nov 2020, 5:28 PM
Ehsan
Ehsan - avatar
0
Unfortunately nothing happened
24th Nov 2020, 10:29 AM
Ehsan
Ehsan - avatar
0
Ehsan, have you been able to set up your VScode to compile C++ programs? If no, I can work you through the process. Or you can read up the process on VScode site, like I did. I can also help though.
24th Nov 2020, 10:50 AM
Daniel Tobi Nyorere
Daniel Tobi Nyorere - avatar
0
I've already read up the process on VSCode website but I haven't been able to compile cpp codes☹☹
24th Nov 2020, 11:07 AM
Ehsan
Ehsan - avatar
0
Ok I will send you the picture of the error
24th Nov 2020, 6:47 PM
Ehsan
Ehsan - avatar
0
البوربوين
28th Nov 2020, 6:11 PM
لقمان شرف الدين
لقمان شرف الدين - avatar