YS
Size: a a a
YS
YS
AP
V
V
G
AN
G
AN
G
RN
complex0.h
сделали namespace CN
, в нём класс complex
, в котором два приватных поля double Re, Im
. В классе объявили два метода:friend std::string to_string(const complex& c);
friend std::ostream& operator<<(std::ostream& os, const complex& c);
operator<<
реализован в соседнем complex0.cpp
так:std::ostream& operator<<(std::ostream& os, const complex& c)при компиляции 44 ошибки, из них единственное уведомление о нашем файле:
{
os << CN::to_string(c);
return os;
}
"std::basic_ostream<char,std::char_traits<char>> &std::operator <<<char,std::char_traits<char>,std::allocator<char>>(std::basic_ostream<char,std::char_traits<char>> &,const std::basic_string<char,std::char_traits<char>,std::allocator<char>> &)" practice_11.7 D:\..\complex0.cpp
Откуда это вообще? Как нормально реализовать этот оператор?JC
JC
RN
AP
AP
AP