⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽

Separating Source Files

Computer Programming C++ / Classes

As you saw in previous sections, where we kept multiple classes in the Main.cpp file, it can lead to really large files. To help us organize our code, generally we split our classes into cpp and header files. This video will show you how.

This next video will explain the #pragma once that is included when you create a header file.

Review Questions

The following are examples of questions similar to what you can expect to see on the next exam.

Hover over a question to show the answer.
  1. How would you include a header file, called Student.h, that you created? #include "Student.h"
  2. Why is it a good idea to split classes into separate files? To keep the project organized, and for reusability.
⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽
© Ryan Appel