What are header files in C++ ( PROGRAMMING TUTORIAL for beginners)

Ғылым және технология

C++ header files are files that usually have .h extensions and they contain declarations of variables, functions... The implementation of those functions goes into the implementation file.
By doing this, if the implementation does not change, there is no need to recompile the implementation file, which would not be possible if everything was in one file.
This also gives us the option to reuse the functions that are declared in the header file in multiple .cpp files. In order to do that you just need to include the corresponding header file in the .cpp file that wants to use those functions.
In this C++ programming tutorial, you will learn what are header files, how to create your own header file, and how to include it and work with it.
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
👉 Download Visual Assist here: bit.ly/VisualAssistDownload
(It improves Visual Studio experience by quickly identifying and fixing code errors)
🎁 Download PVS-Studio for free with #code_beauty promo code: bit.ly/PVS-StudioFreeCB1
▶️ PVS-Studio KZread channel - / @pvsstudio_channel
🇫 PVS-Studio Facebook group - / staticcodeanalyzer
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. Use the link to make a contribution: bit.ly/CodeBeauty_BuyMeACoffee
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
Contents:
00:00 - Intro
02:38 - Before you learn header files, first understand this!
07:23 - What are header files used for?
08:17 - How program compilation works?
13:16 - How to create a header file and implementation file in Visual Studio 2019?
16:45 - What is include iostream?
21:37 - What is pragma once in header files
Learn how to install and use PVS-Studio in this video: • How to detect errors a...
C++ functions Playlist: bit.ly/2PkYpII
Tag me on you Instagram stories:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty

Пікірлер: 595

  • @CodeBeauty
    @CodeBeauty2 жыл бұрын

    📚 Learn how to solve problems and build projects with these Free E-Books ⬇️ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time! 💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time.

  • @rogue_gamer2490

    @rogue_gamer2490

    2 жыл бұрын

    it says "your file couldn't be accessed" ...

  • @program5004

    @program5004

    2 жыл бұрын

    @codeBeauty saldina i can not download a free e-Book about modern C++ and Lambda

  • @sakado7596

    @sakado7596

    Жыл бұрын

    helpful

  • @notavailabull
    @notavailabull2 жыл бұрын

    I am so shocked at how well you are at demonstrating and explaining this concept. I am here because my C++ professor is horrible. I wish more professors were talented as you. Thank you!

  • @CodeBeauty

    @CodeBeauty

    2 жыл бұрын

    🙏❤️

  • @ryanunknown4181

    @ryanunknown4181

    2 жыл бұрын

    Honestly many professors are awful at actually teaching a subject matter they understand. Many are so smart they think everything about a particular subject is trivial.

  • @mba2ceo

    @mba2ceo

    2 жыл бұрын

    Most Pisfers are just POS :)

  • @azmiabduljalilajalil2355

    @azmiabduljalilajalil2355

    2 жыл бұрын

    and they are not as beautiful and pleasant looking as you are.

  • @findoc9282

    @findoc9282

    2 жыл бұрын

    I think not so much of them stand in our shoes to think and teach. They are like: "OK here is my way of teaching trying to fit in"

  • @hasbia2060
    @hasbia2060 Жыл бұрын

    I am the first year of computer science and get an assignment about libraries and finally carried away to this video about this header, thank you, miss your video really help me

  • @karissaexplainsitadhdstyle
    @karissaexplainsitadhdstyle2 жыл бұрын

    Thank you so much for these videos! In less than an hour, watching short videos from you, I understand so much more than I've learned in my college course over multiple months!

  • @andrespalma.6364
    @andrespalma.6364 Жыл бұрын

    I just found this channel yesterday and I absolutely fell in love with the easy and detailed way you explain! Many things I couldn't understand about C++ now are starting to make sense. Thank you for your hard work!

  • @hh-mj4nq
    @hh-mj4nq11 ай бұрын

    This is the most amazing video of header in C++ I have ever seen in my life. This is just brilliant. I can't articulate enough praise to your way of teaching.

  • @angiexbreedt9798
    @angiexbreedt97989 ай бұрын

    I love how you explain everything in such a clear, understandable and simple way. Universities need more lecturers like you!

  • @manideepadithya1120
    @manideepadithya1120 Жыл бұрын

    I love your tutorials.... No BS and everything is on point with a great example. Thanks ✌🏻

  • @dr_ned_flanders
    @dr_ned_flanders3 жыл бұрын

    I like your tutorials they are very clear and well explained. Looking forward to the next one.

  • @cozymonk
    @cozymonk2 жыл бұрын

    Thanks for this video! I have almost no coding background and was trying to learn Game Boy development in C and needed to understand how headers work, but couldn't rack my brain around it. Your walkthrough made everything crystal clear. It was a perfect lesson.

  • @hanirageh4701
    @hanirageh47013 жыл бұрын

    You r simple ,straight forward and makes the code really beautiful. thank you Saldina 😍

  • @peterlantz7966
    @peterlantz79662 жыл бұрын

    Thank you for not only showing how to write the header, but showing how the computer processes each line and why it looks that way!

  • @thedishmastersa
    @thedishmastersaАй бұрын

    If I could like this a billion times, I could... First time watching your tutorial.... I am officially a new subscriber of the channel...

  • @dacharycarey4951
    @dacharycarey49513 ай бұрын

    Thanks a ton! I've been reading a bunch of example projects to glean information, but your clear explanation helped me put together a bunch of pieces of what I had been seeing. I really appreciate you making this video!

  • @emmanueladigwe2973
    @emmanueladigwe29732 жыл бұрын

    You did a fantastic job of explaining the header file concept in C programming. Thank you.

  • @hsngraphics8228
    @hsngraphics8228 Жыл бұрын

    I must express my admiration for the remarkable manner in which you have conveyed your ideas and perspectives through your videos, despite the fact that it has been a span of two years since their original upload. It is with great appreciation that I acknowledge the timeliness of my encounter with your content, as it coincides perfectly with my current circumstances and interests.

  • @stanmoonie6508
    @stanmoonie65083 жыл бұрын

    Thank you very much for this video. I took a C++ class last fall in college and due to Covid it had to be online. Well many details were not fully explored with the class due to it being online. Your video on headers really explained to me the use of these files. So again thank you for everything!!

  • @touficjammoul4482
    @touficjammoul44822 жыл бұрын

    new subscriber, this channel deserves more attention. thank you so much.

  • @AlexDBall
    @AlexDBall3 жыл бұрын

    What a coincidence! I woke up this morning and was wondering what exactly C++ header files are.. Seems like I'm about to find out!

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    Glad I could help! 🤗🤗

  • @juanjocg1870

    @juanjocg1870

    3 жыл бұрын

    the destiny wanted u to learn C++ xdd

  • @wellingtoncarvalho1621

    @wellingtoncarvalho1621

    3 жыл бұрын

    I was talking to a frind about Header files today, hahah

  • @marceloescamilla8867

    @marceloescamilla8867

    3 жыл бұрын

    same

  • @boythee4193

    @boythee4193

    3 жыл бұрын

    me too i was just looking at that last night

  • @mic9047
    @mic90472 жыл бұрын

    This video really helps! I was struggling on this topic for a while and I finally got it. Thank you.

  • @christopherlee5696
    @christopherlee5696 Жыл бұрын

    OMG !!! Your explanation is absolute for beginners like me. I appreciate your clarities and demonstration you gave. Thank you so much Selena. ❤️ from SG

  • @ingmarneple6072
    @ingmarneple60722 жыл бұрын

    Thanks, been trying this for over an hour and now I understand it!

  • @DizzyMay123
    @DizzyMay1232 жыл бұрын

    My lecturer has spent 2 weeks talking about stacks and queue but not how to create a header file or compile it. This video helped me a lot!!

  • @leons.kennedy4582
    @leons.kennedy45822 жыл бұрын

    Saldina, you are the best teacher I ever had. All that you explain is so clear to me. Thank you so much for what you do :-)

  • @lazyayye1143
    @lazyayye1143 Жыл бұрын

    As a beginner in c++ you are a breathe of fresh air for coding explanations, you are very thorough and explain everything wonderfully. Thank you so much!

  • @ryanunknown4181
    @ryanunknown41812 жыл бұрын

    I would advise everyone here that believes this wonderful woman is one of the best people online explaining coding topics to gather multiple sources when needing help understanding a particular coding aspect. I too struggle understanding code. I wholeheartedly believe sometimes it takes multiple people explaining a topic in their own individual way for us some times to really drive home a concept. That said this is my second video of yours Beauty that I have watched and you have really solidified my understanding on some things I’ve already “known” (or kind of knew). Solid channel and you got yourself a new sub. Thanks again.

  • @ericc5652
    @ericc56523 жыл бұрын

    Nice video, you have an expressive pronunciation, I can train in English and c++ by your video )) , with the best regards from Russia

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    It's great to hear that because I've been working a lot on my English so that I don't have an accent that is hard to understand. 🤗❤️💙 Many greeting to Russia 🇷🇺 🇷🇺

  • @ivanetinajero

    @ivanetinajero

    2 жыл бұрын

    @@CodeBeauty I completely agree. You have an excellent accent. What is your native language? Regards from Mexico.

  • @christosioannou9990
    @christosioannou99902 жыл бұрын

    Once again...Your explanations are brilliant, this video was very helpful. Thank you

  • @viniciusmorgado9722
    @viniciusmorgado97223 жыл бұрын

    This is the best explanation about the header files that I already found, thank you soo much!! I was struggling with the text that I found about the topic, greetings to you from Brazil !!! 😌🤗

  • @JiRodya
    @JiRodya3 жыл бұрын

    This video was so helpful, I was learning about header files after coming from java and this was so easy to follow! Thanks

  • @victoriale6719
    @victoriale67192 жыл бұрын

    Saldina, your videos are very helpful! Thank you!

  • @engineersacademy4137
    @engineersacademy41379 ай бұрын

    You are one of the greatest youtubers that learn programming in a very easy and information way. Really you are the best. Please provide us more about oob and arrays and vectors

  • @CodeBeauty

    @CodeBeauty

    9 ай бұрын

    Thank you, I'm happy to help and will continue doing it in the future ❤️🥰

  • @onlyeyeno
    @onlyeyeno Жыл бұрын

    Thanks for a great tutorial video, very comprehensive and clear. Best regards

  • @maxg4958
    @maxg49587 ай бұрын

    Brilliant explanation. The first time I completely understood this topic.

  • @Pikod
    @Pikod2 жыл бұрын

    Omg, this is the best expression I've ever seen. My English is not so well and this is the only video I understand what headers do exactly. Thank you very much.

  • @vima9046
    @vima90462 жыл бұрын

    I watched the entire course of c++ and yes you are so freaking good explaning and as teacher! Really beginner friendly and clear!

  • @CodeBeauty

    @CodeBeauty

    2 жыл бұрын

    💜

  • @vinniciusrosa8284
    @vinniciusrosa8284 Жыл бұрын

    Very good explanation. The best I could find. Thank you so much.

  • @bowasmuke9149
    @bowasmuke91492 жыл бұрын

    There is beauty in the way you make it easier to understand

  • @dennisrose8793
    @dennisrose8793 Жыл бұрын

    Outstanding explanation of header files!!

  • @alexanderizmaylov3419
    @alexanderizmaylov34192 жыл бұрын

    The most beautiful tutor I've ever seen :)

  • @Saad_Hamad
    @Saad_Hamad2 жыл бұрын

    thanks a lot, this video was too helpful for me, your demonstration is very clear and simple, you're too supportive.

  • @gauravnawale8595
    @gauravnawale85953 жыл бұрын

    You are making life easier for thousands of students like me, thanks for your efforts!

  • @mahmoudelrasool8684
    @mahmoudelrasool8684 Жыл бұрын

    No one made me understand c++ concepts or opp like you. I thinks you've to be the angel of the demonstration.

  • @CodeBeauty

    @CodeBeauty

    Жыл бұрын

    That's great to hear. ps: you have lovely profile picture 🥰😃

  • @lavanyasureshkannan123
    @lavanyasureshkannan123 Жыл бұрын

    This material is gold and needs to be preserved

  • @xckevin8718
    @xckevin87182 жыл бұрын

    This video is really helpful! Thank you so much!

  • @ahmadosama2652
    @ahmadosama26522 жыл бұрын

    best explanation i have ever heard , well done

  • @abdo-ar-888
    @abdo-ar-888 Жыл бұрын

    Great Explanation & Easy To Understand, Thanks 🥰.

  • @Brusselsprouts2023
    @Brusselsprouts20232 ай бұрын

    Thank You for all your hard work!

  • @songaogutu
    @songaogutu2 жыл бұрын

    You have explained c++ header files very well.

  • @JoemyJoseph
    @JoemyJoseph Жыл бұрын

    Wow, thank you so much. I am amazed how well you explain this. Thank you

  • @testthisfordecficiencies
    @testthisfordecficiencies2 жыл бұрын

    Perfect chunk of knowledge! Thank you!

  • @CesarAugustoRL
    @CesarAugustoRL2 жыл бұрын

    You are an excellent teacher!

  • @fmanzano1
    @fmanzano13 жыл бұрын

    It's very easy to follow and understand. Thank you very much.

  • @ellegendariosupertallarin8735
    @ellegendariosupertallarin87352 жыл бұрын

    You're such a good teacher, Thank you very muuuuuuuuuuch!!!!!!

  • @juanmauriciomugni5783
    @juanmauriciomugni57833 жыл бұрын

    Thanks, excellent video !! Greetings from Argentina!

  • @_Mrunalwankhede
    @_Mrunalwankhede2 жыл бұрын

    learning about header files in the textbook is so difficult, and you made it sound so easy, Arigatou

  • @CodeBeauty

    @CodeBeauty

    2 жыл бұрын

    🙏💙

  • @page0809
    @page08093 жыл бұрын

    Very good tutorial! It will be very good to see C# tutorials sometime in the future. I'm sure many people are trying to develop games in Unity with C#

  • @laithabuassi2134
    @laithabuassi2134 Жыл бұрын

    Great and simple content, thank you so much 👍

  • @AM-ku9cw
    @AM-ku9cw2 жыл бұрын

    Great explination .. thank you very much !

  • @prateekverma4515
    @prateekverma45153 жыл бұрын

    now understood the concept THANKS!!, love from INDIA ✨✨😃

  • @sriramm3260
    @sriramm32602 жыл бұрын

    Am currently working on a CPP project. your video saves my day, You are a guardian angel mam.

  • @yaMuntaqim
    @yaMuntaqim Жыл бұрын

    Thank you! I come from PHP and Java background and this video helped me a lot with my C++ project.

  • @thrivingproject1920
    @thrivingproject1920 Жыл бұрын

    Super clear, thanks!

  • @braabraa4881
    @braabraa48818 ай бұрын

    You are the best person who explained c++🌹⭐🌹

  • @ashantharindu4660
    @ashantharindu4660 Жыл бұрын

    Thank You!!! Well explained!!

  • @thomaspfaff1074
    @thomaspfaff10743 жыл бұрын

    You are a good teacher. I understand it very well. It's important, who teaches and how

  • @firedragon3371
    @firedragon33713 жыл бұрын

    Your codes and explanations are beautiful as you are xD

  • @yesisor9675
    @yesisor96752 жыл бұрын

    I love your videos and finally comprehending what I should have been taught. Thank you. If by any chance can you create a video explaining how classes can be used in these files.

  • @partheshsoni6421
    @partheshsoni64213 жыл бұрын

    This video was awesome! Thanks!

  • @larsandersen5505
    @larsandersen55053 жыл бұрын

    Very good explanation. Thanks!

  • @drdahmed5396
    @drdahmed53963 жыл бұрын

    Thank you very much. Nice explanation. from Morocco

  • @puneetsaravanan
    @puneetsaravanan3 жыл бұрын

    This video was really a great help for a student like me...... I asked the same question to my teachers.. "What header files?", They could not make me understand them clearly. This video gave me a complete insight about header files in reality.. Thank you very much for your effort....

  • @collengura
    @collengura3 жыл бұрын

    Very good approach, high sense of purpose, clarity and very good voice pitch. Excellent video. I look forward to more of your videos.

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    More to come! 🥰

  • @eidnoxon
    @eidnoxon9 ай бұрын

    23:01 It sure was! I can finally create the project I wanted to, but with finally practicing something AND making it more fun! Thanks, CodeBeauty, it really helped!

  • @arielgiovannetti6683
    @arielgiovannetti66832 жыл бұрын

    Great video! Thank you!

  • @charlesmaganga8430
    @charlesmaganga8430 Жыл бұрын

    You are a great teacher 💕

  • @AbhishekKumar-zv1kn
    @AbhishekKumar-zv1kn6 ай бұрын

    Best Video on Internet for Beginner C++ Developers.😊

  • @ZeeRooGee
    @ZeeRooGee Жыл бұрын

    I just want to say that I now understand head files now thanks to you ❤

  • @jamal.musa.elzein
    @jamal.musa.elzein10 ай бұрын

    Your explanation is very good and simple

  • @fender_fan
    @fender_fan Жыл бұрын

    Thank you so much for your videos. They give much better explanations than the college classes I am paying for!

  • @CodeBeauty

    @CodeBeauty

    Жыл бұрын

    I struggled a lot to understand certain topics at college as well, that's why I make these videos. A lot of people gave up programming because of poorly explained lessons, but it doesn't have to be hard. Programming is our future and I'm glad to help and teach new generations of programmers who will nake this world a better place 😃❤️

  • @mydsmart8390
    @mydsmart83903 жыл бұрын

    You explained it clearly

  • @shahzaibkhan8971
    @shahzaibkhan89713 жыл бұрын

    Your regular student🤓 from Pakistan ❤️ Lots of love and respect for you Mam ❤️

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    So nice of you. Thanks! 🤗❤️

  • @shahzaibkhan8971

    @shahzaibkhan8971

    3 жыл бұрын

    @@CodeBeauty You are welcome Mam ☺️

  • @Zack-xz1ph

    @Zack-xz1ph

    3 жыл бұрын

    @@shahzaibkhan8971 It is spelled "ma'am" brother, it is short for madam

  • @shahzaibkhan8971

    @shahzaibkhan8971

    3 жыл бұрын

    @@Zack-xz1ph thanks for the correction. But it was not a formal comment so it is acceptable 🙂

  • @shahzaibkhan8971

    @shahzaibkhan8971

    3 жыл бұрын

    @@M.A.Kabir.K indeed ❤️

  • @DevAnand-jb7id
    @DevAnand-jb7id2 жыл бұрын

    Really good teaching more than our lectures.Nicely Explained and elaborated.

  • @FerrousJack
    @FerrousJack3 жыл бұрын

    Thank you. Very concise.

  • @davian27
    @davian273 жыл бұрын

    it was so helpful , thank you so much , keep going !👍🏻

  • @danny12345
    @danny123453 жыл бұрын

    Thank you for this lesson. I would love to continue with class and header .The form of writing.

  • @darrylsmith8739
    @darrylsmith87392 жыл бұрын

    Love your work.

  • @joseramonlopez1113
    @joseramonlopez11132 жыл бұрын

    Not sure why I always struggle with this topic and now after 23 minutes understood!!! Thanks

  • @CodeBeauty

    @CodeBeauty

    2 жыл бұрын

    👏☺️💗

  • @dinushkapiyumal7809
    @dinushkapiyumal78093 жыл бұрын

    Love from SriLanka. great explanation..

  • @DenizKartell
    @DenizKartell3 жыл бұрын

    Thank you so much, I can’t wait for the next tutorial 👍👍

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    You’re welcome! Coming soon! 😊

  • @necbranduc
    @necbranduc3 жыл бұрын

    What you could do, in order to simplify your IF statements is convert the firstLetter to either an uppercase or lowercase and then in your IF statements only compare with lowercase or uppercase. Also, far fewer computational comparisons are made.

  • @user-lw7cg3ne3c

    @user-lw7cg3ne3c

    Жыл бұрын

    but doesnt the algorithm for converting a letter to a certain case have its own if statements? with that, you only make your code more computational heavy

  • @WrinkledHound

    @WrinkledHound

    Жыл бұрын

    @@user-lw7cg3ne3c In times past, and maybe still today, you could convert lower case letters to upper case by ANDing the letter with hexadecimal df (decimal 223). Example: if (letter & 0xdf == 'Y') // converts lower 'y' to upper 'Y' and compares to 'Y' The AND operation is very fast with a bonus of not corrupting a letter that is already uppercase.

  • @WahidShahid
    @WahidShahid3 жыл бұрын

    Thanks a lot for such a nice and informative video, I always love the way you explain the topics, once again thanks a lot.

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    Always welcome! My pleasure!🤗🤗

  • @higiniofuentes2551
    @higiniofuentes255111 ай бұрын

    Thank you for this useful video!

  • @user-sc6lo4kt8s
    @user-sc6lo4kt8s2 жыл бұрын

    Learned a lot, thx.

  • @zorimech
    @zorimech2 жыл бұрын

    What's better than a excelent C++ tutorial with an beautiful teacher? I don't know the answer 😂. This was awesome to watch! Thank you.

  • @danbrown6698
    @danbrown66982 жыл бұрын

    You know what we programming learners struggle absolutely so well!

  • @xYMaxRiskYx
    @xYMaxRiskYx3 жыл бұрын

    Thanks for the Tutorial! :)

  • @radomone
    @radomone3 жыл бұрын

    thanks for the video on header files its nice to only need to watch one channel instead of 5-10 to learn programming it has helped me learn alot better than the rate i was going at before

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    I'm so happy to help! Cheers for your progress! 🤞🤞🤗

  • @user-vm8uw1yk2t
    @user-vm8uw1yk2t6 ай бұрын

    thank you really much your videos are really well explained and helpfull

  • @chrishipolito6857
    @chrishipolito68573 жыл бұрын

    Can you do a video on header files with Classes and templates? Those are confusing for me. Btw I love your videos. I have commented this before but I'll say it again. You do a good job at explaining complex topics. And you do a better job at explaining stuff than my computer science teachers

  • @tanlu8120

    @tanlu8120

    3 ай бұрын

    is there one that she made? (since comment is from 2 years ago)

Келесі