C++ 过载<&书信电报;运算符错误C2804:二进制';操作员<<';参数太多

C++ 过载<&书信电报;运算符错误C2804:二进制';操作员<<';参数太多,c++,class,operator-overloading,C++,Class,Operator Overloading,这是我的班级: #ifndef CLOCK_H #define CLOCK_H using namespace std; class Clock { //Member Variables private: int hours, minutes; void fixTime( ); public: //Getter & settor methods. void setHours(int hrs); in

这是我的班级:

#ifndef CLOCK_H
#define CLOCK_H
using namespace std;

class Clock
{
    //Member Variables

    private: int hours, minutes;

    void fixTime( );

    public:
        //Getter & settor methods.
        void setHours(int hrs); 
        int getHours() const;
        void setMinutes(int mins); 
        int getMinutes() const; 

        //Constructors
        Clock(); 
        Clock(int);
        Clock(int, int);
        //Copy Constructor
        Clock(const Clock &obj);
        //Overloaded operator functions
        void operator+(const Clock &hours);
        void operator+(int mins);
        void operator-(const Clock &hours);
        void operator-(int minutes1);
        ostream &operator<<(ostream &out, Clock &clockObj); //This however is my problem where i get the error C2804. Saying that it has to many parameters 
};
#endif
\ifndef时钟
#定义时钟
使用名称空间std;
上课钟
{
//成员变量
私人:整小时,分钟;
void fixTime();
公众:
//Getter和settor方法。
无效设定小时数(整数小时);
int getHours()常量;
无效设置分钟数(整数分钟);
int getMinutes()常量;
//建设者
时钟();
时钟(int);
时钟(int,int);
//复制构造函数
时钟(常数时钟和obj);
//重载算子函数
无效操作员+(常数时钟和小时);
无效运算符+(整数分钟);
无效操作员-(常数时钟和时间);
无效运算符-(int分钟1);

ostream&operator
ostream&operator
ostream&operator它有三个参数。它应该有两个参数。为了将来参考,请不要在发布代码块时使用突出显示反勾号的代码。这有一个单独的按钮(或者你只需将每行缩进4个空格。哇..非常感谢。我可能看起来真的很傻。再次感谢你。基本上是对的,但它不必在课堂外定义。)。
ostream &operator<<(ostream &out, Clock &clockObj); 
friend ostream &operator<<(ostream& out, Clock &clockObj);    
 ostream &operator<<(ostream &out, Clock &clockObj);
 friend ostream &operator<<(ostream &out, Clock &clockObj);