Although declared inside the class, a friend function is not a member of the class. Therefore, while calling it, we do not need to use the object name as we do with the class members. A class member is called by using the syntax
objectname.methodname();
whereas a friend function is called by using the syntax methodname();