1/16
Practice flashcards covering the concepts of separate compilation, class interfaces, implementation files, and the management of namespaces in C++.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Separate Compilation
The process where parts of a program are kept in separate files, compiled individually, and then linked together before the program runs.
Interface
Also called the class definition or specification, this file (usually with a .h extension) contains function and operator declarations/prototypes that users can see.
Implementation File
A file (usually with a .cpp extension) that contains the member function definitions of a class and must include the class's header file.
Encapsulation
A basic OOP principle of separating how a class is used by a programmer from the detail of the class's implementation.
A preprocessor directive where quotes indicate the header file is located in the user's working directory rather than a predefined library.
A preprocessor directive where angle brackets (<>) indicate the header file is a predefined library found in the library directory.
Application File
Also known as a driver file, this is the program file that includes the class header file to use its functionality.
Preprocessor directives used to ensure that a header file is only compiled once, even if it is included multiple times in a project.
Namespace
A collection of name definitions, such as class definitions and variable declarations, used to handle potential name conflicts.
using Directive
A statement, such as "using namespace std;", that makes all definitions in a specific namespace available.
Global Namespace
The namespace used for all code that is not explicitly placed in a named namespace; it is always available without a using directive.
using Declaration
A syntax, such as "using Name_Space::One_Name;", that makes exactly one specific name from a namespace available.
Qualifying Names
The act of specifying exactly where a name comes from using a qualifier and the scope-resolution operator (e.g., NS1::fun1()).
Compilation Unit
A file, along with all the files that are included in that file via preprocessor directives.
Unnamed Namespace
A grouping with no name that keeps definitions local to a specific compilation unit, providing a local scope rather than a global scope.
Nested Namespaces
The legal practice of defining a namespace within another namespace, requiring names to be qualified twice (e.g., S1::S2::sample()).
Helping Function
A low-level utility function not intended for public use that can be hidden by making it a private member function or placing it in an unnamed namespace.