Тёмный

Run C/C++ Code Visual Studio Code On Ubuntu 

Linux Hero
Подписаться 351
Просмотров 106 тыс.
50% 1

Run C/C++ Code Visual Studio Code On Ubuntu....
{
"version": "2.0.0",
"tasks": [
{
"label": "debug",
"type": "shell",
"command": "",
"args": ["g++","-g", "${relativeFile}", "-o","a.exe"]
},
{
"label": "Compile and run",
"type": "shell",
"command": "",
"args": [
"g++","-g", "${relativeFile}", "-o","${fileBasenameNoExtension}.out", "&&", "clear" , "&&" , "./${fileBasenameNoExtension}.out"
],
"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
}
}
},
]
}

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 184   
@LinuxHero
@LinuxHero 6 лет назад
Copy Code From Description
@Plutonergy
@Plutonergy 6 лет назад
How do i make this the default setting?
@midas2570
@midas2570 5 лет назад
@@Plutonergy did u find a way?
@midas2570
@midas2570 4 года назад
@Satyam Sundaram no. Still have this problem :(
@partialdata
@partialdata 5 лет назад
these damn task runners are harder to figure out than the actual program i'm trying to write... Thank you sir!
@ajeetworking
@ajeetworking 4 года назад
lol so true
@drachnelord7433
@drachnelord7433 3 года назад
Thanks brother, was trying for three days without a break! love the song
@cyfull1985
@cyfull1985 4 года назад
thanks a lot bro, still work on 2020...
@stalker1961
@stalker1961 4 года назад
2020, June 18. Working Respect+
@LinuxHero
@LinuxHero 3 года назад
Thanks . Sub++ 😊
@swapneil5549
@swapneil5549 6 лет назад
was trying since last 30 mins on how to run c++ code in visual studio when I came across this. Solved my problem. Thanks man!!
@LinuxHero
@LinuxHero 6 лет назад
You Are Welcome...
@faisalahmed9434
@faisalahmed9434 5 лет назад
I spent more than 5-6 hours -_-
@amirbahador.developer
@amirbahador.developer 4 года назад
tnx man Its really work!!! ty very much
@jeffcheng2868
@jeffcheng2868 6 лет назад
Man, you are awesome. Thanks. Setting up Virtual Machine and running Ubuntu weren't that difficult, but setting up VS Code to run has proven indeed very difficult. Thanks!
@shahriar-siddique
@shahriar-siddique 4 года назад
Thanks man!! That save my many time.
@LinuxHero
@LinuxHero 4 года назад
স্বাগতম ভাই। sub++?
@gabriel7cd310
@gabriel7cd310 4 года назад
case folk not be success in open the task.json file, after press ctrl+shift+b in list you can see 1 or more selects option of c/cpp compiler builder and in right side of item have a small gear, click this and the task file be open, after past the json code in file, save and enjoy :)
@blackbarry45
@blackbarry45 5 лет назад
do you have this for c# ?
@dk0263
@dk0263 3 года назад
thanks a lot for this bro! works like a charm and saved me a lot of time trying to configure this
@LinuxHero
@LinuxHero 3 года назад
Welcome. Stay Safe.
@abboskhamidullaev3948
@abboskhamidullaev3948 4 года назад
very good. thank you!!
@minhaz2597
@minhaz2597 5 лет назад
it's very helpful video.Thank you sir..
@CREATIVEEXPERTZ
@CREATIVEEXPERTZ 4 года назад
Thank You Sir :D keep making such videos
@LinuxHero
@LinuxHero 4 года назад
Welcome .😀
@darshant6935
@darshant6935 3 года назад
u are a legend...awesome tutorial!!
@SimonYells
@SimonYells 5 лет назад
Simple and straight to the subject! Thanks :D
@hameddoroudi1993
@hameddoroudi1993 3 года назад
thanks ,thats short and powerly .nice
@AHMEDADEL-qx2ip
@AHMEDADEL-qx2ip 6 лет назад
Maaan, this video saved my life. Finally, I can now start coding and finish my freaking assignment.
@LinuxHero
@LinuxHero 6 лет назад
Welcome. I'm glad to help you.
@cesarmoltoni
@cesarmoltoni 5 лет назад
It's works in Kubuntu 18.10 Very helpful
@danielyozak
@danielyozak 5 лет назад
Nice dude its working! Thanks you... Finaly a will code in visual
@samuelrushton8090
@samuelrushton8090 5 лет назад
You can also just use the code runner extension
@motaharhossain4855
@motaharhossain4855 4 года назад
Code runner sometime sucks.
@prachij
@prachij 5 лет назад
Seems it only doesn't worked for me
@LinuxHero
@LinuxHero 4 года назад
Oh!
@motaharhossain4855
@motaharhossain4855 4 года назад
Do you gave gcc and g++ installed in your machine.?
@rk_0059
@rk_0059 4 года назад
thanks brother. i was trying for last 2 hours.
@ln4043
@ln4043 6 лет назад
Hello from Russia))) thank you very much))) its work)) but need install gcc on your system)))
@LinuxHero
@LinuxHero 5 лет назад
Welcome.
@rafehn
@rafehn 5 лет назад
You can install gcc on ubuntu by typing the following command in terminal sudo apt-get install gcc
@ln4043
@ln4043 5 лет назад
@@rafehn yes all right)))
@essamahmed1511
@essamahmed1511 4 года назад
/bin/bash: g++: command not found The terminal process terminated with exit code: 127 it gives me that every time i try to run the simple code however i followed the same steps !!
@areebmuzaffarsyed859
@areebmuzaffarsyed859 4 года назад
askubuntu.com/questions/583171/bin-bash-g-command-not-found-error-127
@SohelRana-hi7ec
@SohelRana-hi7ec 4 года назад
install g++ in your machine.
@madihashabbir
@madihashabbir 5 лет назад
i couldn't find that json code file. is it present in the installer?
@SohelRana-hi7ec
@SohelRana-hi7ec 5 лет назад
Copy from video description.
@SohelRana-hi7ec
@SohelRana-hi7ec 5 лет назад
Copy from video description
@md.saifulislam3352
@md.saifulislam3352 4 года назад
Well done. Thank you very much............
@LinuxHero
@LinuxHero 4 года назад
ধন্যবাদ
@parthsharma322
@parthsharma322 3 года назад
thank you sir for your service.
@josuecoronado1300
@josuecoronado1300 5 лет назад
2019; still working!
@mandeep2192
@mandeep2192 4 года назад
it finally worked !!.. thnx
@LinuxHero
@LinuxHero 4 года назад
Welcome. :)
@marekcingel6633
@marekcingel6633 5 лет назад
Very nice example. Haw to create precompiled header?
@CrazySkillz15
@CrazySkillz15 5 лет назад
Thanks so much! Was looking for something just like this :)
@juliocesar2159
@juliocesar2159 4 года назад
Thanks, it worked.
@RajeshKrishnan1
@RajeshKrishnan1 4 года назад
How to launch a debug session where a C/C++ program is called from a shell script in Visual Studio Code?
@motaharhossain4855
@motaharhossain4855 4 года назад
F5
@JSCruz-to9cr
@JSCruz-to9cr 5 лет назад
Oh dear god!! It finally works, thanks a lot!!
@LinuxHero
@LinuxHero 4 года назад
Welcome and Subscribe. 😊
@johnnguyen6224
@johnnguyen6224 4 года назад
Thank you for the guide! Working in 2020
@LinuxHero
@LinuxHero 4 года назад
Thank You. Stay Subscribe :)
@johnnguyen6224
@johnnguyen6224 4 года назад
@@LinuxHero Do you know how to enable the terminal in the IDE to 'let user input data'? Example: int main(){ int a,b; printf("Please insert number: "); scanf("%d", &a); b = a * a; printf("Result is: %d * %d = %d", a, a, b); return 0; } Online IDE let me insert a number. VS code does not. Thanks in advance
@LinuxHero
@LinuxHero 4 года назад
@@johnnguyen6224 Which ide you use?
@LinuxHero
@LinuxHero 4 года назад
If you use VS Code then after pressing ctrl+shift+b . you will see a black terminal and a keyboard cursor blinking. Then you will enter a number and press enter.
@LinuxHero
@LinuxHero 4 года назад
And if you use Windows then follow his method. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Si8rN5J249M.html
@photon2724
@photon2724 5 лет назад
wtf. This just confused me further. All i had to do for my previous ide was press a single button to compile and run. What is this shit...
@HugoMaxMTeixeira
@HugoMaxMTeixeira 3 года назад
Thanks a lot.
@КаримДергаусов
@КаримДергаусов 4 года назад
Elektronomia - Sky Higt music.. Good
@samuelfelipev.goncalves6352
@samuelfelipev.goncalves6352 5 лет назад
thanks dude!
@angelluisgomezmartinez89
@angelluisgomezmartinez89 4 года назад
It works, thank you!!!
@nancygarcia9814
@nancygarcia9814 4 года назад
Finally!! thanks a lot, blessings :D
@leodeguzman463
@leodeguzman463 5 лет назад
thanks man.....hope you also make how to remove autofill on vs code
@manavendrasen
@manavendrasen 4 года назад
you are god thank you soooo much
@sankalpgodghate7001
@sankalpgodghate7001 6 лет назад
The output console flashes for a second and then vanishes off. I will really appreciate if you could help that out.
@javierflores5727
@javierflores5727 4 года назад
figured it out?
@szabolcsagai
@szabolcsagai 5 лет назад
Thanks, hero of the day is you today :)
@juniorcoder6988
@juniorcoder6988 6 лет назад
Very useful ! Thanks for author !
@manikanthanekkalapudi
@manikanthanekkalapudi 5 лет назад
Holy Shit! This works! Thanks you! :)
@vanshbhardwaj4214
@vanshbhardwaj4214 5 лет назад
how to debug..explain please
@bjay6886
@bjay6886 5 лет назад
f5
@eudo81
@eudo81 5 лет назад
thanks man , you are a hero!
@omerzerenuz6184
@omerzerenuz6184 4 года назад
you're a true hero
@LinuxHero
@LinuxHero 3 года назад
Thanks
@ziwok5831
@ziwok5831 5 лет назад
Thanks so much! But how to debug?
@gogolja4
@gogolja4 5 лет назад
The Best! Thank you very much
@nidhish1407
@nidhish1407 5 лет назад
Damn....this works. Thanks man :)
@rajangohil497
@rajangohil497 5 лет назад
Worked, thanks!
@borufkaz
@borufkaz 6 лет назад
Works great!
@andresperezgomez9179
@andresperezgomez9179 3 года назад
ProAndroid's volume test song
@deeppanchal1332
@deeppanchal1332 5 лет назад
Thanks. It works
@Anonymous-2-0-1-2
@Anonymous-2-0-1-2 4 года назад
An unknown Hero . Thanks
@LinuxHero
@LinuxHero 4 года назад
Thank You 😀
@midas2570
@midas2570 5 лет назад
Do i have to do this every time i open a new file?
@LinuxHero
@LinuxHero 5 лет назад
No
@midas2570
@midas2570 5 лет назад
@@LinuxHero so how can i apply these as default or sth?
@akash-alam
@akash-alam 5 лет назад
just press ctrl+shift+b
@ihate4chan
@ihate4chan 4 года назад
Do I have to do this everytime I create a project/ cpp file?
@LinuxHero
@LinuxHero 4 года назад
No.
@maxmiau
@maxmiau 4 года назад
The easist method by far, but still i have no idea what the json file do :(.
@erai-sama
@erai-sama 5 лет назад
Thanks it's worked +1
@turararykbaev840
@turararykbaev840 5 лет назад
Thank You VERY MUCH!!!
@rapid1010
@rapid1010 5 лет назад
thanks
@Rahul.Kumar.
@Rahul.Kumar. 4 года назад
Great! Finally works. Can you do the same for java also. Thanks a lot
@motaharhossain4855
@motaharhossain4855 4 года назад
Use Geany. Its great. You can compile and run any programming language. I have tasted C/C++, Java and Python.
@shiwanshsingh4977
@shiwanshsingh4977 4 года назад
from where i get json code that you pasted??
@LinuxHero
@LinuxHero 4 года назад
Check Video description
@longhai6825
@longhai6825 5 лет назад
what is this Theme?
@yourownazog8069
@yourownazog8069 6 лет назад
The greatest thanks to you!!!!!!!
@LinuxHero
@LinuxHero 6 лет назад
Welcome
@quazar-omega
@quazar-omega 4 года назад
Thank you, this has saved me
@unlucky9095
@unlucky9095 4 года назад
u save my life man tnk u
@ta2ulk
@ta2ulk 4 года назад
Thanx a lot ^^
@alijavidi2503
@alijavidi2503 5 лет назад
2019 , You saved me
@devpatel7916
@devpatel7916 4 года назад
app kon sa linux use karte ho?
@LinuxHero
@LinuxHero 4 года назад
Mainly I use Ubuntu, but I also use Manjaro and KDE Neon.
@shivamnaik2460
@shivamnaik2460 4 года назад
how to get output on system terminal like konsole
@LinuxHero
@LinuxHero 4 года назад
You can use Geany. Its Great!
@Filipcorobivblenderi
@Filipcorobivblenderi 3 года назад
It worked until i tried to link more files... Any help? I cant move
@LinuxHero
@LinuxHero 3 года назад
Just copy your cpp or c file to your workplace folder.
@Filipcorobivblenderi
@Filipcorobivblenderi 3 года назад
@@LinuxHero its different then linking in projects. This works for me: #include "SecondPage.cpp "
@flswttr
@flswttr 3 года назад
didnt work
@kasimbasil4481
@kasimbasil4481 4 года назад
thank u so much , u saved me ! Legend.
@limitless9483
@limitless9483 4 года назад
HERO thanks
@fustrebe
@fustrebe 3 года назад
Ty brother
@Nicolasm15inze
@Nicolasm15inze 5 лет назад
Doesn't work anymore, do you know what happened?
@danilobrandolin4287
@danilobrandolin4287 5 лет назад
I changed "command": "g++", and replaced ${relativeFile} with ${file}
@Batfly01
@Batfly01 4 года назад
Don't work : The problem is on "launch.json", not "task.json".......
@LinuxHero
@LinuxHero 4 года назад
Can you tell what wrong you see?
@Batfly01
@Batfly01 4 года назад
@@LinuxHero It's ok now, in fact, the problem was a conflict between two extensions I added, so I can't compile corretly. Sorry to disturn about it .
@16_deveshshirsath88
@16_deveshshirsath88 5 лет назад
Worked mannn!!
@gosharevo
@gosharevo 4 года назад
thank u
@JA-vt1mh
@JA-vt1mh 4 года назад
thanks!
@LinuxHero
@LinuxHero 3 года назад
Welcome!
@ankurbhatia24
@ankurbhatia24 5 лет назад
How to make the settings default.
@LinuxHero
@LinuxHero 5 лет назад
Do it once. and open the same folder everytime. it works
@salmanhossainsajeeb2196
@salmanhossainsajeeb2196 6 лет назад
How to run Java code with visual studio code on Kali Linux..
@LinuxHero
@LinuxHero 6 лет назад
More Video Is Coming Soon.
@fujiahermawan8
@fujiahermawan8 3 года назад
thx its work
@Abdurrahim-eo1kq
@Abdurrahim-eo1kq 6 лет назад
nice video..
@LinuxHero
@LinuxHero 6 лет назад
Thank You
@LinuxHero
@LinuxHero 6 лет назад
Thank You
@christopherlathrop6317
@christopherlathrop6317 5 лет назад
Thank you!
@LinuxHero
@LinuxHero 5 лет назад
Welcome
@adityabealways
@adityabealways 5 лет назад
Thanks man!!
@j.nikhilsudhan1301
@j.nikhilsudhan1301 4 года назад
thx bro...
@evgeniygazetdinov1620
@evgeniygazetdinov1620 4 года назад
god save you and your parents.like and huge thanks!!!!!!!!!!
@LinuxHero
@LinuxHero 4 года назад
Thank You❤️
@nalanbyc3849
@nalanbyc3849 5 лет назад
You got my 100% love.
@nalanbyc3849
@nalanbyc3849 5 лет назад
Wroks for Deepin user until now.
@phamphungoctrai7235
@phamphungoctrai7235 5 лет назад
thanks a lot
@objectiveauto9326
@objectiveauto9326 5 лет назад
it goes from 0 to 200 in 0.2 sec =))
@francescobassino2471
@francescobassino2471 6 лет назад
I love you
@akash-alam
@akash-alam 6 лет назад
wow thanks dear
@LinuxHero
@LinuxHero 6 лет назад
You Are Welcome...
@LinuxHero
@LinuxHero 6 лет назад
Welcome
@loeipm3953
@loeipm3953 6 лет назад
thank you
@LinuxHero
@LinuxHero 5 лет назад
Welcome
Далее
Install and Run C++ in Visual Studio Code (Linux)
13:43
История Hamster Kombat ⚡️ Hamster Academy
04:14
Avaz Oxun - Turqi sovuq kal
14:50
Просмотров 889 тыс.
Debugging C/C++ with Visual Studio Code
8:50
Просмотров 265 тыс.
VS Code Top-Ten Pro Tips
9:36
Просмотров 1,9 млн
7 AWESOME Linux Terminal Applications and Utilities
11:49
Microsoft Office Alternatives On Linux ...
8:29
Просмотров 47 тыс.
Linux Directories Explained in 100 Seconds
2:53
Просмотров 1,5 млн
История Hamster Kombat ⚡️ Hamster Academy
04:14