A class member function that automatically initializes the data members of a class exists called a constructor.
<h3>
What is meant by member function?</h3>
Operators and functions that are designated as members of a class are known as member functions. Operators and functions declared with the friend specifier are not included in member functions. These are referred to as class pals. Together, data members and member functions describe the characteristics and actions of the objects in a Class. Data members are the data variables, and member functions are the functions used to control these variables.
In C++, there are typically five different types of member functions available. Specifically, friend member functions and basic, static, const, inline functions. Classes-only functions are member functions. Any private, protected, or public member of its class may be accessed using the public member function. Any member function of a class, not just the public ones, has access to every single other member that has been declared inside the class. so are easy to programme.
Hence, A class member function that automatically initializes the data members of a class exists called a constructor.
To learn more about member functions refer to:
brainly.com/question/15554910
#SPJ4