更新时间:2023-11-10 18:50:04
Traffic_light&operator++(Traffic_light& t) 是一个名为 operator++ 的函数.每个功能都应在任何其他功能之外定义.所以把操作符的定义放在main之前.
Traffic_light& operator++(Traffic_light& t) is a function with name operator ++. Each function shall be defined outside any other function. So place the definition of the operator before main.