记录详情

Compile Error

foo.cc:59:10: error: 'istream' does not name a type
   59 |   friend istream &operator >>(istream &in, matrix &m) {
      |          ^~~~~~~
foo.cc:67:10: error: 'ostream' does not name a type
   67 |   friend ostream &operator <<(ostream &out, matrix &m) {
      |          ^~~~~~~
foo.cc: In function 'int main()':
foo.cc:80:2: error: 'cin' was not declared in this scope
   80 |  cin >> k;
      |  ^~~
foo.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
foo.cc:86:2: error: 'cout' was not declared in this scope
   86 |  cout << ans1 << ans2;
      |  ^~~~
foo.cc:86:2: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1019 OO4-3 矩阵类的算术运算符的重载
语言
C++
递交时间
2022-05-16 21:20:34
评测时间
2022-05-16 21:20:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes