A C++ class is similar to a C structure except that it may also contain member functions in addition to member data. That is, when you define a class, you are defining to the compiler a new data type. You may later declare variables of the newly-defined type. The new type consists of some data, and some functions for manipulating that data.