Main Content

Header-Only HPP File

This example creates a MATLAB® interface to a C++ library named school. The library is defined in the header file school.hpp and does not have a compiled library file. A library defined completely by its header file is called a header-only library.

Library ArtifactsMATLAB Package libnameMATLAB Help

Header file school.hpp (default name)

>> doc

This library defines classes representing students and teachers. After you publish this library, MATLAB users can call functions in the package to create Student and Teacher objects and specify names and ages.

MATLAB provides the header file for you to use in this example in this folder:


Use these steps to create a school interface for Windows®.

Related Topics