Definitions
A class is a user-defined type.[2]
[2] Please note that the terms class and storage class have nothing to do with one another. This is another case where C++ reuses the same word for different concepts, although at least “storage class” isn't a keyword. We should be grateful for such small favors.
A class interface tells the compiler what facilities the class provides. This interface is usually found in a header file, which by convention has the extension .h.[3]
[3] At least, that is the convention for classes created by “normal” programmers, like you and me. The header files that define the classes in the C++ standard library have no extensions and in fact may not even be stored in normal files. An example is the <string> header file ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access