Back to Browse

How to Create Header File in Dev C++ using class | C++ programming 2020 | udemy bonus lecture

1.9K views
Jul 29, 2020
42:28

Now Topic of the Lecture that I am going to give as bonus is “How to create your own header files” We read about the header files in another video of my channel i.e Program structure in C++ and we looked at the header files provided by C++ and we read about the header files created by the programmer… we did not go into the depth of that because it was a beginner course and it is usually covered in the advanced courses of C++. But it’s an important one.. So we will cover it right now in the bonus lecture. In this video, we will see how can we create our own header file in C++. So now we look at the steps that are required in order to create your own header file. So there are 5 steps that we need to follow…. first of all I will show you one large program that has a class implemented in that program the name of the class is game and the main function is in the same program so the class and the main program they both are in one program just like we did before in a previous lectures…. Next Step will be In order to create our own header file we will divide the program into three separate files. Main.cpp VideoGame.h VideoGame.cpp Now we look at their details The first one is main .CPP which is actually the main program and all the main program statements are inside this program. Next the second part is the header field that VideoGame.h. This header file contains all the declaration of variables and functions in it so you can say that VideoGame.h contains all declarations of the concepts we will use in the class Next the third file is CPP file its name is VideoGame.cpp. This file contains the variables initializations and functions code in it. & Finally So once we will once we are done with that we will include the header file VideoGame.h in the main program in order to recognize the variables and functions used in the program and also we will include the header file VideoGame.h in the CPP file… Why are including the header file in the cpp file?? Well ,, we did that because we know that cpp file contains the implementation of functions in it so that when the variables & functions are used in the VideoGame.cpp file…. Those variables and are recognized by the compiler. if we do not include the header file VideoGame.h in VideoGame.cpp the compiler will not recognize the variables & functions used in the VideoGame.cpp file and will give an error. So this is a short description of all the steps that we are going to follow in order to create our own header file. Still, If you have any doubt we will go to dev C++ and do all steps over there and then you can understand in case of any doubts so let's go to DevC++ & create our own header file. To get premium C++ course for beginners, please take my course https://www.udemy.com/course/c-in-six-hours-tutorial-for-beginners/?referralCode=27A09CC49E49C1CE30F1 my second Udemy course : C++ file handling project : Student database management and result calculation system https://www.udemy.com/course/learn-c-file-handling-project-console-mini-database/?referralCode=E00641FF56934AC58707 My Third Course Master Number Conversions in 2.5 hours https://www.udemy.com/course/master-number-system-conversions-in-two-hours/?referralCode=1E1F22F2DB9D3B18D440 you can see my other videos on C++ as shown below First C++ Program https://youtu.be/q8awCQhVg_I Program structure in C++ https://youtu.be/jPJ6w659DSA Introduction to C++ language https://youtu.be/1MHrqrzHE4s How to download and install DevC++ https://youtu.be/Ds0hDjKcXFU C++ course curriculum overview | udemy C++ course | C++ course for beginners https://youtu.be/n0zoivGX75o how to create your own header file in dev C++ https://youtu.be/25aeqRKgp78 Books recommended for C++ https://youtu.be/DdBf-Mg2z-s Facebook group : C++ programming 2020 https://web.facebook.com/groups/1349012638618274/?ref=bookmarks Udemy Profile: https://www.udemy.com/user/sarah-naseem/ Twitter: C++ Programming by Sarah https://twitter.com/ByProgramming #createHeaderFile #HowToCreateHeaderFileInCplusplus #howToMakeHeaderFileInCplusplus #udemyBonusLecture

Download

0 formats

No download links available.

How to Create Header File in Dev C++ using class | C++ programming 2020 | udemy bonus lecture | NatokHD