a function that is a member of a class is called
This is accomplished with the static modifier. Fields that have the static modifier in their declaration are called static fields or class variables. They are associated with the class, rather than with any object. Every instance of the class shares a class variable, which is in one fixed location in memory. Any object can change the value of a class variable, but class variables can also be manipulated without creating an instance of the class. C++ Class member functions. A member function of a class is a function that has its definition or its prototype within the class definition like any other variable. It operates on any object of the class of which it is a member, and has access to all the members of a class for that object. Member functions can be defined within the class definition or separately using scope resolution operator, ::. Defining a member function within the class definition declares the function inline, even if you do not use the inline specifier. 1 A class can be used as the base class for a derived new class. The derived class inherits all of the properties of the base class. The derived class can add new members or change base class members.  In a C++ program the OOP paradigm is centered around your class definitions. Constructors (C++) A constructor is a kind of member function that initializes an instance of its class. A constructor has the same name as the class and no return value. A constructor can have any number of parameters and a class may have any number of overloaded constructors. 1 The derived class can add new members or change base class members. C++ Support for OOP (cont.) 2  In a C++ program the OOP paradigm is centered around your class definitions.  You can not spend too much time thinking about the structure of your data and designing your classes BEFORE writing a line of code. 1 Can be defined as member of the class with a single parameter Complex operator+(Complex); Left side of operator is current object. Right side is specified type.  Can be declared outside of a class with two parameters one of which must be of the class type. Must declare operator as friend of the class. When a number of objects are created from the same class blueprint, they each have their own distinct copies of instance variables. In the case of the Bicycle class, the instance variables are cadence, gear, and speed. Each Bicycle object has its own values for these variables, stored in different memory locations. 1 Base class can declare virtual functions that are redefined in derived classes and the compiler is responsible for sorting it out. class Employee  { // ... Base case must define a function for the virtual function unless it is an abstract class. 1 A class can be used as the base class for a derived new class. The derived class inherits all of the properties of the base class. The derived class can add new members or change base class members. C++ Support for OOP (cont.)  In a C++ program the OOP paradigm is centered around your class definitions. It operates on any object of the class of which it is a member, and has access to all the members of a class for that object. Let us take previously defined class to access the members of the class using a member function instead of directly accessing them:
Constructor