Visual C++: Adding a New Header (.h) File to a Project (2008)
Adding a New Header (.h) File to a Project (2008)
This video shows how to add a header (.h) file to an existing project. Assuming that you have a project open, you can follow these instructions:
- Begin by left-clicking the "Header Files" folder in the "Solution Explorer" pane on the left.
- Then in the menubar, left-click "Project" and "Add New Item" in the submenu.
- This opens the "Add New Item" dialog. Left-click "Visual C++" in the "Categories:" Pane and then "Header File (.h)" in the "Templates:" pane.
- Then left-click the "Name:" box and type in the name of the header file. In this example, we are assuming that the header is for a class named CMyClass. So, the file name is "CMyClass.h" as shown. To finish the dialog, left-click the "Add" button.
- The header file has now been added to the project and you should see it there. The file is actually located in the your project folder on your hard drive. If you open your project folder, you will see the new file there, as shown above.