foo.cc:22:16: error: ‘ostream’ does not name a type
22 | friend ostream& operator<<(ostream& out,const Complex& c)
| ^~~~~~~
foo.cc:30:16: error: ‘istream’ does not name a type
30 | friend istream& operator>>(istream& in,Complex& c)
| ^~~~~~~
foo.cc: In member function ‘Complex Complex::operator*(const Complex&)’:
foo.cc:21:9: error: expected ‘;’ before ‘}’ token
21 | }
| ^
foo.cc: In function ‘int main()’:
foo.cc:40:9: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
40 | cin>>c1>>c2>>c3;
| ^~~
| std::cin
iostream:62:18: note: ‘std::cin’ declared here
foo.cc:41:9: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
41 | cout<<c1+c2+c3<<endl;
| ^~~~
| std::cout
iostream:63:18: note: ‘std::cout’ declared here
foo.cc:41:25: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’?
41 | cout<<c1+c2+c3<<endl;
| ^~~~
| std::endl
In file included from iostream:41:
/nix/gcc-14-20241116/include/c++/14-20241116/ostream:741:5: note: ‘std::endl’ declared here
741 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~