摘要: friend std::ostream& operator<<(std::ostream &ot, const List& lis); 参数表中第一个ot应该是引用,因为 std::ostream 是不可复制的,只能通过引用进行传递,以确保正确的流传递和状态维护。 要访问类的私有成员时,非成员函数重 阅读全文
posted @ 2024-05-19 20:47 yige-pig 阅读(11) 评论(0) 推荐(0)