Those are two different constructors. You would typically refer to them as "constructors"; that's the standard term. They are functions that get run when the object is created.
1 2
Bob someNewBobObject; // this would cause the constructor Bob() to be run
Bob anotherBobObject(7); // this would cause the constructor Bob(int a) to be run
Constructors are functions with the same name as the class. Like any other function overloading, they must differ in the types and number of arguments that is unique, including no arguments. That is how the compiler knows which one to call. So it is not so much referring to them, it's calling them.
In this example you would call Bob(); the default constructor. It is the constructor that gets used without any user supplied arguments. The Bob(int a); is also a constructor, but this time the user wants to supply the value for int a.
#include <iostream>
class Bob{
int BobsInt;
public:
Bob();
Bob(int a);
int getBobsInt();
};
Bob::Bob() {
BobsInt = 5; //The default value
}
Bob::Bob(int a) {
BobsInt = a;//The user supplied value
}
int Bob::getBobsInt() {
return BobsInt;
}
int main() {
Bob Bob1;//the default constructor called
Bob Bob2(7);//constructor with user input
std::cout << Bob1.getBobsInt();
std::cout << "\t" << Bob2.getBobsInt();
return 0;
}