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

Sdílet
Vložit
  • čas přidán 9. 06. 2024
  • 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 CZcams 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
  • Věda a technologie

Komentáře • 595

  • @CodeBeauty
    @CodeBeauty  Před 2 lety +40

    📚 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 Před 2 lety

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

    • @program5004
      @program5004 Před 2 lety

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

    • @sakado7596
      @sakado7596 Před rokem

      helpful

  • @notavailabull
    @notavailabull Před 2 lety +198

    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  Před 2 lety +5

      🙏❤️

    • @ryanunknown4181
      @ryanunknown4181 Před 2 lety +17

      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 Před 2 lety +1

      Most Pisfers are just POS :)

    • @azmiabduljalilajalil2355
      @azmiabduljalilajalil2355 Před 2 lety +2

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

    • @findoc9282
      @findoc9282 Před 2 lety +1

      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 Před rokem +3

    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

  • @hh-mj4nq
    @hh-mj4nq Před 11 měsíci +3

    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.

  • @karissaexplainsitadhdstyle

    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 Před rokem +2

    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!

  • @thedishmastersa
    @thedishmastersa Před měsícem

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

  • @AlexDBall
    @AlexDBall Před 3 lety +36

    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!

  • @angiexbreedt9798
    @angiexbreedt9798 Před 10 měsíci

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

  • @ericc5652
    @ericc5652 Před 3 lety +28

    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  Před 3 lety +11

      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 Před 2 lety +2

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

  • @manideepadithya1120
    @manideepadithya1120 Před rokem +1

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

  • @dr_ned_flanders
    @dr_ned_flanders Před 3 lety +3

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

  • @hanirageh4701
    @hanirageh4701 Před 3 lety

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

  • @zorimech
    @zorimech Před 2 lety +5

    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.

  • @ryanunknown4181
    @ryanunknown4181 Před 2 lety +2

    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.

  • @cozymonk
    @cozymonk Před 2 lety +2

    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.

  • @mahmoudelrasool8684
    @mahmoudelrasool8684 Před rokem +1

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

    • @CodeBeauty
      @CodeBeauty  Před rokem

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

  • @emmanueladigwe2973
    @emmanueladigwe2973 Před 2 lety

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

  • @touficjammoul4482
    @touficjammoul4482 Před 2 lety

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

  • @ingmarneple6072
    @ingmarneple6072 Před 2 lety

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

  • @engineersacademy4137
    @engineersacademy4137 Před 9 měsíci +2

    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  Před 9 měsíci

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

  • @peterlantz7966
    @peterlantz7966 Před 2 lety

    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!

  • @leons.kennedy4582
    @leons.kennedy4582 Před 2 lety

    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 :-)

  • @CesarAugustoRL
    @CesarAugustoRL Před 2 lety

    You are an excellent teacher!

  • @hsngraphics8228
    @hsngraphics8228 Před rokem

    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.

  • @victoriale6719
    @victoriale6719 Před 2 lety

    Saldina, your videos are very helpful! Thank you!

  • @alexanderizmaylov3419
    @alexanderizmaylov3419 Před 2 lety +1

    The most beautiful tutor I've ever seen :)

  • @dacharycarey4951
    @dacharycarey4951 Před 3 měsíci

    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!

  • @lazyayye1143
    @lazyayye1143 Před rokem

    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!

  • @dennisrose8793
    @dennisrose8793 Před rokem

    Outstanding explanation of header files!!

  • @maxg4958
    @maxg4958 Před 8 měsíci

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

  • @lavanyasureshkannan123

    This material is gold and needs to be preserved

  • @stanmoonie6508
    @stanmoonie6508 Před 3 lety

    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!!

  • @mic9047
    @mic9047 Před 2 lety

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

  • @songaogutu
    @songaogutu Před 2 lety

    You have explained c++ header files very well.

  • @ahmadosama2652
    @ahmadosama2652 Před 2 lety

    best explanation i have ever heard , well done

  • @ellegendariosupertallarin8735

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

  • @christopherlee5696
    @christopherlee5696 Před rokem

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

  • @christosioannou9990
    @christosioannou9990 Před 2 lety +1

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

  • @vinniciusrosa8284
    @vinniciusrosa8284 Před rokem

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

  • @onlyeyeno
    @onlyeyeno Před rokem

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

  • @yaMuntaqim
    @yaMuntaqim Před rokem +1

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

  • @mydsmart8390
    @mydsmart8390 Před 3 lety +1

    You explained it clearly

  • @bowasmuke9149
    @bowasmuke9149 Před 2 lety

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

  • @vima9046
    @vima9046 Před 2 lety +2

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

  • @xckevin8718
    @xckevin8718 Před 2 lety

    This video is really helpful! Thank you so much!

  • @gauravnawale8595
    @gauravnawale8595 Před 3 lety +1

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

  • @braabraa4881
    @braabraa4881 Před 8 měsíci

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

  • @charlesmaganga8430
    @charlesmaganga8430 Před rokem

    You are a great teacher 💕

  • @Brusselsprouts2023
    @Brusselsprouts2023 Před 2 měsíci

    Thank You for all your hard work!

  • @abdo-ar-888
    @abdo-ar-888 Před rokem

    Great Explanation & Easy To Understand, Thanks 🥰.

  • @testthisfordecficiencies

    Perfect chunk of knowledge! Thank you!

  • @laithabuassi2134
    @laithabuassi2134 Před rokem

    Great and simple content, thank you so much 👍

  • @sofianetaleb5818
    @sofianetaleb5818 Před 2 lety +1

    I really like how she explains things

  • @thrivingproject1920
    @thrivingproject1920 Před rokem

    Super clear, thanks!

  • @chrishipolito6857
    @chrishipolito6857 Před 3 lety +30

    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 Před 3 měsíci

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

  • @AM-ku9cw
    @AM-ku9cw Před 2 lety

    Great explination .. thank you very much !

  • @prateekverma4515
    @prateekverma4515 Před 3 lety +3

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

  • @juanmauriciomugni5783
    @juanmauriciomugni5783 Před 3 lety

    Thanks, excellent video !!
    Greetings from Argentina!

  • @AbhishekKumar-zv1kn
    @AbhishekKumar-zv1kn Před 6 měsíci

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

  • @DizzyMay123
    @DizzyMay123 Před 2 lety

    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!!

  • @viniciusmorgado9722
    @viniciusmorgado9722 Před 3 lety

    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 !!! 😌🤗

  • @user-sc6lo4kt8s
    @user-sc6lo4kt8s Před 2 lety +1

    Learned a lot, thx.

  • @Pikod
    @Pikod Před 2 lety

    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.

  • @fmanzano1
    @fmanzano1 Před 3 lety

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

  • @JiRodya
    @JiRodya Před 3 lety

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

  • @danbrown6698
    @danbrown6698 Před 2 lety +1

    You know what we programming learners struggle absolutely so well!

  • @ashantharindu4660
    @ashantharindu4660 Před rokem

    Thank You!!! Well explained!!

  • @FerrousJack
    @FerrousJack Před 3 lety +1

    Thank you. Very concise.

  • @drdahmed5396
    @drdahmed5396 Před 3 lety

    Thank you very much. Nice explanation. from Morocco

  • @arielgiovannetti6683
    @arielgiovannetti6683 Před 2 lety

    Great video! Thank you!

  • @dinushkapiyumal7809
    @dinushkapiyumal7809 Před 3 lety +1

    Love from SriLanka. great explanation..

  • @CodingKillua
    @CodingKillua Před 2 lety +1

    i love your tutorial saldina

  • @larsandersen5505
    @larsandersen5505 Před 3 lety

    Very good explanation. Thanks!

  • @_Mrunalwankhede
    @_Mrunalwankhede Před 2 lety

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

  • @darrylsmith8739
    @darrylsmith8739 Před 3 lety

    Love your work.

  • @joseramonlopez1113
    @joseramonlopez1113 Před 2 lety +1

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

  • @DenizKartell
    @DenizKartell Před 3 lety +2

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

    • @CodeBeauty
      @CodeBeauty  Před 3 lety

      You’re welcome! Coming soon! 😊

  • @JoemyJoseph
    @JoemyJoseph Před rokem +1

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

  • @jamal.musa.elzein
    @jamal.musa.elzein Před 11 měsíci

    Your explanation is very good and simple

  • @fender_fan
    @fender_fan Před 2 lety +1

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

    • @CodeBeauty
      @CodeBeauty  Před 2 lety

      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 😃❤️

  • @DevAnand-jb7id
    @DevAnand-jb7id Před 2 lety +1

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

  • @nickrandomergaming7306

    you are such a great tutor thanku so much

  • @Saad_Hamad
    @Saad_Hamad Před 2 lety

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

  • @higiniofuentes2551
    @higiniofuentes2551 Před rokem

    Thank you for this useful video!

  • @ZeeRooGee
    @ZeeRooGee Před rokem

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

  • @firedragon3371
    @firedragon3371 Před 3 lety

    Your codes and explanations are beautiful as you are xD

  • @thomaspfaff1074
    @thomaspfaff1074 Před 3 lety

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

  • @lisoibhudabeats2588
    @lisoibhudabeats2588 Před rokem

    thank you very much you've helped me a lot

  • @collengura
    @collengura Před 3 lety

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

  • @davian27
    @davian27 Před 3 lety

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

  • @john.dough.
    @john.dough. Před rokem

    Thanks for the helpful video.

  • @jeenap.r6648
    @jeenap.r6648 Před rokem

    Excellent class

  • @Duge6124
    @Duge6124 Před 3 lety

    Wow the timing of this video ... God bless you

  • @gabrielcouto4356
    @gabrielcouto4356 Před rokem +1

    Fantastic, thank you

  • @xYMaxRiskYx
    @xYMaxRiskYx Před 3 lety +1

    Thanks for the Tutorial! :)

  • @WahidShahid
    @WahidShahid Před 3 lety +1

    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  Před 3 lety

      Always welcome! My pleasure!🤗🤗

  • @sriramm3260
    @sriramm3260 Před 2 lety

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

  • @user-vm8uw1yk2t
    @user-vm8uw1yk2t Před 6 měsíci

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

  • @partheshsoni6421
    @partheshsoni6421 Před 3 lety

    This video was awesome! Thanks!