C++ Tutorial for Beginners - Learn C++ in 1 Hour
ฝัง
- เผยแพร่เมื่อ 1 มิ.ย. 2024
- Learn C++ basics in 1 hour! 🚀 This beginner-friendly tutorial is your fast start for this powerful language.
🚀 Ready for a deep dive?
- Check out my complete C++ course: bit.ly/ultimate-cpp
- Subscribe for more awesome content: goo.gl/6PYaGF
📕 Get the FREE goodies:
- C++ cheat sheet & summary notes: bit.ly/3zEnPEs
✋ Stay connected:
- Twitter: / moshhamedani
- Facebook: / programmingwithmosh
- Instagram: / codewithmosh.official
- LinkedIn: / codewithmosh
📖 TABLE OF CONTENT
0:00:00 Course Introduction
0:00:56 Introduction to C++
0:04:14 Popular IDEs
0:06:11 Your First C++ Program
0:13:36 Compiling and Running a C++ Program
0:16:01 Changing the Theme
0:17:16 Course Structure
0:18:48 Cheat Sheet
0:19:20 Section 1: The Basics
0:19:52 Variables
0:26:00 Constants
0:27:28 Naming Conventions
0:30:25 Mathematical Expressions
0:36:39 Order of Operators
0:39:49 Writing Output to the Console
0:49:06 Reading from the Console
0:53:41 Working with the Standard Library
0:58:19 Comments
1:00:51 Introduction to Fundamental Data Types
1:01:41 Section 2: Fundamental Data Types
1:04:45 Initializing Variables
1:09:29 Working with Numbers
1:13:03 Narrowing
1:15:17 Generating Random Numbers
💡 Why C++?
- It's a high-performance language used in gaming, systems programming, and more.
- Great for learning core programming concepts.
👉 This tutorial is perfect for you if:
- You're a complete beginner.
- You want a fast and practical intro to C++.
- You're aiming for a career where C++ is valuable.
#coding #programming
- Subscribe for more C++ tutorials: goo.gl/6PYaGF
- Want to learn more? Try my Complete C++ Programming course: bit.ly/ultimate-cpp
- Get my free C++ cheat sheet and summary notes: bit.ly/3zEnPEs
Please Uncle Mosh, make a video on Dart and Flutter ...Full Tutorial 😊🙏
Thanks for this video
Thanks 👍 very much uncle Mosh.
You're wonderful.👍
Hey, sir. Could you make a new course on C#? That one is pretty outdated.
hey mosh, can you please recommend me some awesome python beginner friendly books? would rlly appreciate it thanks!!!
Reach-out for further assistance
Helpline📲📥⬆️
When they say we need teachers, they are talking of people like you. Thank you for taking all of this time and effort and sharing with everyone who wants to learn.
i kinda wanna make u feel good, lmk how i can try.
@@alexpascal5403the actual fuck?
cap
I just started to learn C++ last week at university, there are so many things to learn, I don't know where to start until I found your channel and this video, it answered all my questions about C++, thank you very much you saved me and my programming class.
I am a very young coder. Your tutorials find it very helpful, the reason I'm already good at Python is because of your Py Tutorial. Your videos also help me get ready for college, university and even software engineering jobs.
same im 11
same too I’m 10
I'm using this for science fair
Same im 12
I have just joined uni and have medical background and knows nothing about coding but an aspiring coder IA
Even though i am watching this 1 year later, i hope you find my comment because i love your videos. I have also watched your python for beginners video that was 6 hours long and i loved it. You are very underrated compared to other channels which are more popular while having less quality content. I love the little exercises that you give us. I have now learned over 5 programming language just because of your videos and now me and my friends are also making a game. This is only possible because of you.
Glad to hear your progress. I hope your game turns out great!
SKIPPING AT YOUR GYAT FOR THE RIZZLER , U SO SKIPIDI , U SO FANUM TAX , I JUST WANNA BE YOUR SIGMA🔥🔥🔥🔥🔥🌬🌬🌬🌬🔥🔥🔥🔥🌬🔥🌬🌬🌬🔥🔥🔥
It's just crazy how this guy knows everything, C++, CSS/html, java, Python, JavaScript et cetera.
Edited
I just saw this comment I made in the past and laughed 😂, I now know and have worked with most of the languages, It's so easy and they're all similar, I learnt some of these languages in 1 week. My experience have thought me that these languages are just tools and a programmer is a person who solves problems, the major skill is how you think. I can literarily work with any language now.
Practice. Lots of practice.
Programming is about problem solving. Programming languages are tools. Tools come and go. Everyone likes their own set of tools. Once you learn programming (problem solving), you can use any languages you want. Most languages are very similar in nature. As a beginner, don't expect yourself to learn all of these over night! I've been doing this for almost 30 years! ;)
😮😯 30 F-ing years. Good lord.
1-2 years of coding experience is all thats needs to know 1-5 languages in depth. Probably less since this is based off a personal assessment and im fairly slow at learning.
@@torch4762 that's encouraging
Thanks, didn't know C++, but after this one-hour tutorial I'm ready for my new job as elevator software programmer
I just finished a basic programming logic course and I'm so glad I found your channel to start learning actual code! So far, it's really easy to understand! Thank you from Argentina!!
👍
This is a nice comprehensive beginner's guide! I'm trying to get ahead of my college classes by adding c++ to my collection of known languages. I've been skipping around this video and figuring out how the basics of the language work, and it's going very well.
I came from a medical school of nursing and have literally zero knowledge of Game programming and development but somehow you made it easier for me to understand the basic of programming. Youre awesome and im looking forward to more of your video.
You know learning a programming language is not even the scratch on the surface of game developing, don't you?
OMG!! Mosh finally releases a C++ tutorial! We want more lower level stuff from you Sir. Possibly also Advanced C++ & Beginner / Advanced C in the future?
Advanced C++ takes another teacher. You can’t expect that from someone like Mosh. It’s too specific and requires an expert.
@@WouterStudioHD why what the problem with mosh
U guys think that if I can write code with J's py so I can't with CPP
Hhhh mosh is an expert in c sharp by the way and he can make advanced courses
@@devcyber303 you have no clue about C++.
@@WouterStudioHD at least show some respect for the effort of mosh
U guys prefer the paid courses i know
But mosh is just doing that to help people
And by the way I am a computer scientist with 7 years of experience in unv teaching i teach Haskell language i can write with lot of programming lags so do not disrespect me sonny because the Langs that i use it maybe u don't know it at all hv good night
And last advice don't use the lang use the logic behind the science (alg/)
This is not the full tutorial. Check his description to register for the full course.
This is more compilated than python. I'm an engineer and am learning on my own, and not only wish to master the language, but always curious as to why the programmers chose the symbols the use and if they have an analogy to pure mathematics. Thanks for the videos! You are straight forward with this stuff, wish you were here in Caltech for private tutoring. 😊
same, stuff like this is extremely useful now
@@Kfruistik and extremely difficult
thanks man, today was my first day to get started with C++ and to set up my macpro with right IDE and code editor, from 09:00 o'clock to 01:00 o'clock i struggled but failed because having a macbook model 2014. but thanks to you , you helped me to get started in just 15 minutes. hats off to you. thanks for your help
Love this! I've been looking for free ways to learn all sorts of code, and you have the perfect tutorials! I love how all the tutorials are between 45 minutes to 90 minutes long, it isn't that time consuming compared to learning it in other ways!
th-cam.com/video/_x27Sz-QkZM/w-d-xo.html
lmao this isn't complete course
@@8BitGamerYT1 Yeha I noticed in the middle of the video. I’ve moved on to better languages and creators that don’t lie lmao
@@AndyWandyBandy he is a good instructor but isn't totally free. That's his only drawback.
@@8BitGamerYT1 yeah
Good stuff as always! You really inspired me to share my own experience through my TH-cam channel as someone who switched careers to the tech industry. Thank you for everything!
I'm a beginner learning c++ because of my desired course in the university. This tutorial is very beneficial to me. At first I hated programming but now I like this very much. Thank you
I completed your Python course a few months back, and I loved it. I am back again to learn from one of the best online teachers I've had. Cheers Mosh!
This is one of the best C++ tutorial introductions I've ever seen. Would love to see more from you on this subject.
th-cam.com/play/PLJQ716XnVlCKSWBj79lNHmo04EPSWXJrM.html
Great Course as always! As I said many times before, just like 'Java' and other courses the only thing that is missing is the "Project". Project based courses are allways the best.
I know, basics are very important, but Projects are like seeing the results and motivates you to do great things 🙂
Reach-out for further assistance
Helpline📲📥⬆️
Reach-out for further assistance
Helpline📲📥⬆️
🌞🌠 u are like sun and star
but it is spelled always
@@haibro2398 what?
Decided I wanted to learn C++ in unreal engine instead of using unity for games dev. All of the unreal engine C++ tutorials seem to assume that you know the entire language off by heart. This is some of the best and most useful teaching I have ever seen, and hopefully it will allow me to go back to unreal engine and actually make something that compiles and works. Thank you for providing this for free, a better resource than anything my university has provided, and that costs 9k.
Coding with c++has never been easier...your voice is so soothing and you make it so simple...Thanks Mosh!!!
Dear Mosh, Your courses are just really fantastic. You are a really great tutor. You inspired me to start coding. Thanks a lot! ❤️❤️
Thanks a lot! Please support me by liking and sharing this video. :)
@@programmingwithmosh Done!
Reach-out for further assistance
Helpline📲📥⬆️
@@programmingwithmosh How is C++ compared to Rust in your opinion? Is Rust faster and safer?
indeed
Seems the course is very clear to follow Mosh, the real-life analogies were great like the buckets with apple & oranges and how to swap using a third bucket! They helped understand the process & grateful for the way you are coding c++ swiftly but still some terms are hard to understand... but am trying to as a biology student. 6.4.2023
Incredible beginner course, this has prepared me for my first computer science course and it has deepened my passion for programming! His courses are worth it! You are easily the best teacher that I've ever had.
this tutorial is absolutely amazing i went from knowing just about nothing about c++ to feeling like im ready to learn more advanced stuff
Love your explanation and examples/ exercises only if more professors were like this !
agreed
Love your explanation Mosh. Wanted to say thank you because this is genuinely the most helpful tutorial I've ever seen.❤
For more enquiries reach out⬆️🆙
My teacher told me to learn how to code with c++ and this was VERY helpful thanks a lot!
Extremely helpful I just started an intro C++ course and couldn’t understand anything until I watched this video
Sir I'm a Computer Science Student from India
And i wanted to learn C++ for the off campus foreign placements to the MNC's.
I came across your channel a few weeks ago and I'm enjoying it 😊
Thank you for your efforts
Love from India ♥
Reach-out for further assistance
Helpline📲📥⬆️
I am also a computer science student from India
In 1st year presently
@@aboodkhaja4039 haha same, what college?
@@aravpanwar2431 same what college?
@@buckie4687 haha same, what college?
Finally the great Mosh Sir with the language of oldest and great DSA our favourite C++ ✌️😊😉
Thank you for your lesson! I just started learning C++ one week ago on Grade 7, and this really helps me on my homeworks!
You really are an amazing instructor and the fact that I learned better with your instructions than $20,000 / year college cost is injustice, thank you for your generosity and very effective method of teaching!!
Hi Mosh I recently came across your videos. You are a really good tutor, teaches things in simple and easy ways leaving no confusions. Can you do a video on Selenium with Python for the front end testing.
Thank You Mosh, C++ is my type.
This is my first time learning any type of programming language, ever! And this video makes life so easy. I'll recommend your channel to anyone that wants to take a course in programming language and does not know where to start. Thank you so much Mosh, God bless you❤
Really like the way you show the result of improper coding. Rather than just saying "don't do it", you actually show what happens if you do. Great to know and helps with troubleshooting issues later. Course is also a good pace, not too slow or fast. I went to check out your paid courses - will probably do that when I get some free time. If you can teach complex topics as well as these simple ones then it's definitely worth the money.
Thanks Mosh. Good job.
Hi Mosh, just wanted to say you are doing a great job. you really make c++ look so easy (so far). I'm still waiting for you to upload the rest of this series, which I hope will be more useful and resourceful for the viewers.
the rest of the series is paid which can be purchased on his website
yeah he makes it look easy but then look at his python courses python itself is easy
Hello sir. I really love your video here. All the things that were taught were very helpful and concise for beginners like me!! So, I really hope and looking forward to you to post a full course video from beginning to advance for C++.
This 1 hour tutorial is so good, i wanted to learn this programming language since a long time and this video was the only one who succeded. I liked and subscribed.
I came across a few channels and i found this gurus, thank you for helping me getting started into programming and c++
Thank you man✊🏽♾
Great guide really appreciate it
I have mastered java and now I am moving towards C++
dude you are freaking incredible at teaching coding...amazing work on this video!
I tried it , loved it , and got so advanced . Thank you so much for creating this ❤❤❤. Please never stop uploading such tutorials. You are a great mentor for all of us 😊
After learning JS and C, C++ looked kinda hard syntactically but you dissected all the concepts so well! Very nice video as usual
Helpline📲📥⬆️
Question can come in⬆️
Syntax isn't too bad. What becomes hard is keeping everything from becoming a mess. That is why learning coding standards is important.
After learning C# I actually find C++ to be more straightforward in many ways.
Thank you so much, in the first few segments (only 13:40 so far). You actually helped anchor in a lot of stuff I was looking for to get started. I've looked through Python and JavaScripts before when trying to modify games or modify a value or thing or two in a mod but never made my own script. I would mimic what I saw in edits and trial and error and not understand really what meant what other than, this "format" breaks it, this other "format" doesnt. The reason I picked C++ though is because I want to make a tool to help the modding process for Skyrim that hasn't been made yet. Very excited to see what the full vid has in store. Got to 36:50. Pages full of notes. Y'know I was always wandering what % modulus meant on FM synthesizers. Now I do. Actually they call them operators too. But none of the manuals helped me get what they all meant so I always just went by sound anyway. I love how its a coding vid that taught me how my synth worked in a more definitive way. I will finish it off tomorrow
hows your skyrim tool going?
Hi mosh,
The bestest part of this video is that cheat sheet which allow me to focus more on the video rather than taking notes, however I make sure to practice the code snippets that you have explained:) ...
Thanks a ton
I am taking the C++ 3 part class as a brush up. Excellent course, I recommend it. Good value too. Mosh's courses are really good.
All thanks 👍 to our tutor, Mosh Hamedani for providing us with this wonderful and encouraging C++ course. We really really appreciate. Thanks 👍 very much..👍👍
Mosh you are so good at explaining difficult concepts and explaining them in a way that is easy to understand! The order in which you present information is really great! If you could make a video about how to be a great teacher and organize content for students to learn that would be so cool! Even if you just gave an interview about how you teach and organize content.
Reach-out for further assistance
Helpline📲📥⬆️
Except that there are no difficult concepts in this tutorial. From skimming trough the video I see that it's just very basic stuff that anyone could figure out on their own if they know atleast a bit of programming. It doesn't show any C++ specific features like smart pointers, classes, inheritance, operator overloading, etc...
@@_________________404 sure mr know it all
@@kenny_eats_many Bro it literally is just variables and some basic functions, I'm not sure if he even shows if statements or any flow control statements. You could easily figure this stuff out on your own in a few minutes if you already have some basic knowledge of programming. These fundamental things are often exactly the same in other "C style" languages like java, C#, javascript, etc..
I'm saying this because everyone who watches this should already know what a variable or if statement is, if this is your first time programming then it's better to read or watch some introductory tutorial which doesn't focus on a specific language, but rather on the logic associated with programming. Trying to learn C++ as a complete programming beginner makes no sense.
@@_________________404 what do you suggest am absolute beginner. I have now basic programming knowledge.
I am 36 mins in and I am loving this video so far. I can already code at an intermediate level in C#, and I’ve been wanting to learn about C++ because, 2 years from now, I am moving from Jamaica to the US and hopefully find a job in coding, 3d modeling, animation, or database design. I can do all of those except code well in C++, and most tech and game companies want someone who can code in C++
unbelievable! you're amazing Mosh! I love the way you teach it's so simple and understandable !! keep going 😁😁
Hey Mosh! I just started my journey towards programming languages. I had confused. But I found your channel. Your teaching style amazing.
Helpline📲📥⬆️
Question can come in⬆️
Thanks for this course This is the best course on youtube which I have ever seen
I learned to code back in the late 90's in Pascal, the language that the notation form gets it's name from - so I'm certainly old enough to be your dad. But I'm not too proud to say you took me to school today. I'm picking coding up again this year and this was very well presented and easy primer for c++.
Bro I’ve always wanted to learn how to code and this has helped so much, I’m trying to get into game development and you’ve been very helpful❤
You're a gifted teacher, sir! I will definitely enroll for this course on your web site! Thank you so much for your great work!
Dm for more info
For new students, this information(and the way you presented it) is invaluable! So thanks a bunch.
last night when i decided i wanted to learn how to code i didnt even know what coding was. your video has helped me understand and improve so quickly!
Thank you sooo much for all the efforts you put in your videos, Mr. Moshfegh Hamedani! I truly appreciate each and every second of your videos, especially the Python course one. Have a great day, my Teacher. :)
I've been waiting so long for you to do this course. Waiting for your flutter course also ❤️
This tutorial is much better than any other paid courses. He is the best instructor.
Thanks a lot you helped me gain lost interest in programming languages. Your world's best programming language teacher. Thanks for your kindness of providing free tutorials on TH-cam. 🙏👍❤️
thank you sir ,this video helped me a lot
😄
I love the level of detail in the explanation. Keep up the good job.
👆send a direct message for support and guidance..
I'm very lucky to find your channel! You're an awesome teacher!
I did not realize how much over an overlap between Python and C++ is but this is a great refresher for my up coming interviews.
If you’re going to use int then you should also use float. Both int and float can have different sizes depending on the platform. If you’re going to use double, which is a fixed sized floating point, then you should use short or long which are explicitly sized ints.
I was waiting for this moment 🥰I can’t wait to start C++ , Mosh is the best of the best teacher 👨🏻🏫 . Thank you so much Mosh
Thanks a lot! Please support me by liking and sharing this video. :)
fantastic tutorial! bought the full course on sale, will continue from there. Thank you so much for this!
For the Fahrenheit tutorial I was so close lol. Thank you for explaining how to easily do this! I had the same result but the Celsius function is great to know.
int main() {
cout > value;
cout
Thank you so much for this tutorial! 🥺 I never thought I could go back to programming after a 10 year long break :) Btw, I managed to write the Fahrenheit to Celcius program with one less line of code, all thanks to you 🤘
👆send a direct message for support and guidance..
10 year 😮
A real scholar will set reminder for this premiere
18:50 This is what we like to call a “Baller Move.” Seriously, you didn’t have to give us a cheat sheet but you did. Greatly appreciate that!
My guy, you are so far the most helpful to us beginners. I thank you.
Great course as usual, i do want to point that you shouldn't use "using namespace std" since it can cause conflicts later on
you want to teach a programming guru😂😂😂😂
Not necessarily! No need to over-engineer for what-if scenarios that may never happen.
@@programmingwithmosh Plus vs devs messed up by using "using namespace std" in the visual studio 2010 ver
@@sparkscomputerprogramming A programming guru should also know not to teach beginners bad habits... namespace std should be avoided.
@@programmingwithmosh java gui
Please take 6+ hour course like python course 🙏
yes they are more extensive
Yess plzz
He has one on python 3 years ago it’s 6hours
@@StriaghtRight I think they are talking about C++
Bro go and learn it in giving website even it's more extensive
Thumbs up Mosh for this......its amazing to interact with the c++ as my first programming language. You are super
I'm just new to learning C++. Your videos are great and easy to learn. Can you make more of your C++ series?
This tutorial is incredibly helpful. Thank you, Mosh!
Please teach us from beginner to advanced.
Accurate information with medium speed, I’ll give it 100 out of 100! 🌟
You really went out of your way to help us understand and learn how to code, thank you very much!
This tutorial is better than most. However, please talk about the c++ linker and go more in dept on memory and management. If you want more info about each including operator overloading I recommend watching the Cherno. He’s building his own game engine in cpp and worked in EA. Also he goes much more in depth about everything if you truly wanna learn how everything works. For example, did you know that the include statement literally copy and pastes the code from the library into the compiled file after compiling time?
Edit: during compiling time not after
As person coming from python
there is definitely things that I didn’t understand completely but for the most part this felt like a good intro to the language
Dear Mosh, Your courses are just really fantastic. You are a really great tutor. You inspired me to start coding. Thanks a lot
Great tutorial, I do always watch tutorials from this channel from python and other languages. I really do appreciate it. And this video is very useful since I will now enter college in BSCS. Thanks a lot.
Great to hear!
Seriously I wanted this for a long time. Thank you so much Mosh! I would definitely purchase the full version of this course.
Thanks a lot! Please support me by liking and sharing this video. :)
@@programmingwithmosh Always Mosh!
Your C++ programming tutorials are fantastic! The way you simplify complex concepts and provide practical examples really accelerates the learning process. Thanks for making C++ so accessible and enjoyable to learn!
srand(time(0));
int first = (rand()%6)+1;
int second = (rand()%6)+1;
cout
Hej Mosh, I eagerly waited for this course. I just love the way you teach us. Are you planning to upload part 2 of this course or do we need to buy the full course? Because I didn't find Classes and OOPS etc in this lecture.
Classes and OOP are covered in part 3 which I haven't started yet!
@@programmingwithmosh plz upload part 2 really looking forward to this and by the way thanks for you efforts man really appreciate it
Reach-out for further assistance
Helpline📲📥⬆️
its paid
@@warmachine4753
I've been waiting for someone who actually knows how to teach programming, teaching languages that is not that easy to learn like C++.
I'll make use of every single second.
Thanks man, your help won't be forgotten.
Thanks a lot! Please support me by liking and sharing this video. :)
@@programmingwithmosh Consider it Done.
Thanks so much!,im only 11 and you just made my future!
and made my dad be proud of me!
here i am,learning c++ after mastering python...
Here i am again, 12, using c++, python, and some HTML, gonna learn java and more...
Just finished watching all of it, I really enjoy how the step by step works and it helped me remember very well. Thank you :D
Teleqram me👆⬆️.
With confidence? No. This only covers the basics of the basics.
Hey, Mosh.
Excellent course, yet again.
Want you to renew your Python course. Topic by topic or Basics and Intermediate course. Adding few projects where the basics are recalled and practically shown where and how the basics we learn are used.
Love your channel.
Just completed this course. Thanks Mosh!
I am excited for this one!
amazing video! Your python series got me out of python tutorial hell and made me a confident programmer, and ever since I've been looking for a C++ because I just knew that with your tutorial, C++ would just work for me! Thank you for being an amazing teacher!