知道为什么在编译时会出现此错误吗?
ComplexNumber.cpp:21: error: default argument given for parameter 1 of ‘void ComplexNumber::print(std::ostream&) const’
ComplexNumber.h:17: error: after previous specification in ‘void ComplexNumber::print(std::ostream&) const’
这是我在这些特定区域的代码:
复数.cpp
21 void ComplexNumber::print(ostream & out = cout) const {
复数.h
17 void print(ostream & out = cout) const;