Compiling & Executing C++ Programs (VS Code)
HTML-код
- Опубликовано: 4 окт 2024
- C++ Programming: Compiling & Executing C++ Programs (VS Code)
Topics discussed:
1. Compilation of programs.
2. Steps for compiling and executing C++ programs via Visual Studio Code (VS Code) using two methods.
Follow Neso Academy on Instagram: @nesoacademy (bit.ly/2XP63OE)
Follow me on Instagram: @jaiz_itech (bit.ly/2M3xyOa)
Contribute: www.nesoacademy...
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy...
Website ► www.nesoacademy...
Forum ► forum.nesoacade...
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#CPPByNeso #CPP #CompilingCPPPrograms #ExecutingCPPPrograms
There is a lot of confusion for me when I try to run my program but now after watching this masterpiece ,they are just old days for me because now everything is Crystal Clear.
Thanks a lot Sir and team NESO ACADEMY 🙏❤️
i am a complete newbie to vs code and have been trying to get my files to compile for years (yes, years!). this is the video that finally pulled me out of the rabbit hole i was building and finally got my programs to work. thank you so much!
When I select Terminal - Run Build Task, the editor returns 'No build task to run found' That's where the wheels fell off the bus. Now what do I do?
same
Me too😢
You have to install g++ I think
Me too😢
I think method 2 works perfectly, i.e using the terminal
You are the BOSS, i was blocked for more than 3 hours and with your video helped me in 5 min thanks you from Paris
Was totally frustrated in this thing... finally a sigh of relief.. very big thanks 🙏
I am muslim from Pakistan no doubt it doesnot matter but that man who uploaded this video very honest and hardworking explain brilliantly both theoretical and practical part of topic: how to compile and execute a program for c++ in visual studio code I have been unsuccessful for twenty days today I saw this video really learned a lot
This lecture is brilliant,compact and easy to understand ! i've looked for the lectrues like this . Thanks a lot Sir !!
Cool. Thanks for this tutorial. I was able to compile and run in my command prompt terminal but I was having problems in the VS code terminal. I didn't realize you have press the tab key before hitting the enter key. Appreciate the lecture.
I have such a problem:
Build finished with error(s).
* The terminal process terminated with exit code: -1.
* Terminal will be reused by tasks, press any key to close it.
could you please help me
Same pinch
compiling method 1 didnt work as When I select Terminal - Run Build Task, the editor returns 'No build task to run found'
but method 2 worked for me
I have a solution for whoever is also getting Terminal - Run Build Task, the editor returns 'No build task to run found'
Go to Terminal > Configure Default Build Task.
If no options appear, select Create tasks.json file from template.
Choose Others.
Edit the tasks.json file and paste the following:
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.exe"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
],
"detail": "Generated task by VS Code."
}
]
}
Now click on test.cpp and do it again (Terminal > Run Build Task) and it will work and create test.exe
Guys I'm not first and I'm not last but I'm here for to get something 😁
A heart???😂😂😂
Thank u very much
This is what no one is teaching
My first program run successfully
neso you are best in every field
things are starting to make sense finally. And I havent even started writing a proper program 😂
Certainly a different beast to Python, which ive started to get bored of. You definitely start to appreciate how accessible it was.
Thank you so much,finally done😊
now, ok. Terminal > Build Task > g++. I don't have any of those hints even if i type them they dont compare. What can i do for it?
At last the only video which helped me to setup and execution of the first code on vs code.....
standard of teaching is at top notch, keep going .....
You have a great way of teaching. Proper pedagogy
Sir what If we can directly run the code by pressing the shortcut key ,,,ctrl+alt+N
It was so useful and awesome. Thank you for your explanation ❤❤❤
Please tell that which mic and recorder used...
The voice is too clear and understandable 👍
1000+ love ❤️
thank you so much sir. i will grateful to you all through my life.
Yes please upload daily 🙏😊
Could NESO academy upload lecture videos meteorically, please. Could this academy also create videos on MACHINE LANGUAGE?
Nice sir looking forward for...many programs thanks
i love you sir.
python really spoiled us new learners 😂
Great video. Thank you!
Great Success. Thank you !
This is one of the best explanations I've encountered! Thank you please make more vids! Liked and Subbed! 🎉
Beautifully explained
I love Neso Academy ❤️
Thank you man for solving my problem ❤
someone here knows how to debug c++ in visual studio ?
Please upload daily 🙏❤
Thank you so much sir 💖
Thank you sir❤
Sir your lectures are amazing
THANKS MATE FOR YOUR HELP
What is the difference of compiling from Command prompt and Visual studio?
Please explain it!
where’s the .vscode from? i followed all the steps but still didn’t know where you got that from
You have my respect sir ❤❤❤❤
Thanks a lot sir, it helped me a lot
Thank you ❤
why it shows ' Error: there is no registered task type 'cppbuild'. Did you miss installing an extension that provides a corresponding task provider? ' in output section and also why are there output section and problem section if everything can be manage in terminal ?
what is the name of your compiler. I dont think i have the same one since I am a mac user
in terminal section it does not work
You solved a big problem sir !
Excellent content as always
Love from Maharashtra 💖💖💖
I got an error saying that the task's command wasnt recognized as an internal or external command
We can use this in command prompt
Okay so mine i just click run program and under output all the results come. What am i doing and how different is it from this
I tried the same program to compile and execute, Method-2 works fine but incase of Method-1 it compiled successfully but does not create any .exe file. Error message shows file missing or not in executable form. How can I fix it?
Thanks! I'd been trying to compile a program, but skipped the "build" step. Tried to use commands like code and cmake in VSC terminal, edit launch.json file and thought about returning to Linux terminal and vim (or just compiling the text, made in VSC, using terminal and gcc). This Visual Studio products have a weird interface that I can't understand intuitivey.
Why do all these tutorials show how to compile a single file? I want to know how to properly compile a large project consisting of header and cpp-files in different folders...
3:14 where can I find the "dextop" folder?
You are the best ❤️❤️
well explained...
Great lecture
6:19 I am running via MSVC and got the error 'cl.exe' is not recognized as an internal or external command,
operable program or batch file. Tried editing the system and user path variables with the cl.exe path and it still didn't work. No clue what to do.
Thanku sir😊
thankyou so much sir
i finally compiled the code, but i still see some annoying things like your file name can't have space, but all my files have more than one word and use space.
i don't think i have G++ on my computer.
(prelaunchtask c/c++ g++.exe build active file terminated with exit code), run and dubbug krne pe ye aa rha h .
Why python course not there in neso academy
It is available now.
When I click "Run build task.." I don't have the options you have. And I get this message: "The terminal process failed to launch (exit code: -1).". Any tips what I should do?
May be install some extensions from Microsoft? I have C/C++, C/C++ extension pack, Cmake, Cmake tools.
anyone? my output and last line (i.e program path) getting executed in same line. that so irritatng for me. I want my output in new line and program path in new line . how can I do that?
Please upload daily
can you do c# tutorials to!!
thanks a lot
But executable file was not created
Then how to add external library
THANKS, DEAR SIR.......PLZ UPLOAD C++ VIDEO AS HURRY AS POSSIBLE...😍😍🤗
Thankss broo
So I ran ./test.exe in the vscode terminal. The file runs but prints nothing. What should I do?
I think it's .\test.exe rather.
The slash is backward not forward.
Superb..!
Good job
a lot thanks sir
Congratulations to the 200 firsts
It is showing no build task to run found. What should I do?
Same here
codeblock is best for this
How can I download g++?
The exe file don't open😢
We are always beginner 😀
Tnkuu so much
No run build task is shown
method 2 is working..
Can u tell me how 2nd method is working perfectly because when I write .\a.exe and then enter then it shows error😔I tried lots of time but it doesn't work.
thx :)
Oh interesting video I liked this video yes!!!!👍😅
done!
cl.exe doesnt exist for me
it isn't going like this for me , i don't have this senario !!!!!!!!!!!
My a.exe file is not creating
I love it❤️
my man
🔥🔥
•●◉✿◦•●◉✿love this channel✿◉●•◦✿◉●•◦
Very confusing
🥇 first
I am first✌️
First like