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.
00:00 – Intro
02:48 – Before you learn header files, first understand this!
07:33 – What are header files used for?
08:27 – How program compilation works?
13:26 – How to create a header file and implementation file in Visual Studio 2019?
16:55 – What is include iostream?
21:47 – What is pragma once in header files
🎁🎁🎁 Get one month free trial of the PVS-Studio with #code_beauty promo code on the link below:
For more interesting info about analyzer and programming check out:
PVS-Studio Facebook group: https://www.facebook.com/StaticCodeAnalyzer/
PVS-Studio YouTube channel: https://bit.ly/2PFcrVu
Learn how to install and use PVS-Studio in this video: https://youtu.be/AeyTSLGIX1M
C++ functions Playlist: https://bit.ly/2PkYpII
Tag me on you Instagram stories:
Instagram 📸 – https://www.instagram.com/truecodebeauty/
Twitter 🐦- https://twitter.com/TrueCodeBeauty