记录详情

Compile Error

foo.cc: In member function 'int Maximum::setNumber()':
foo.cc:16:26: error: 'cin' was not declared in this scope
   16 |                          cin >> number;
      |                          ^~~
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:16:33: error: 'number' was not declared in this scope; did you mean 'setNumber'?
   16 |                          cin >> number;
      |                                 ^~~~~~
      |                                 setNumber
foo.cc:22:25: warning: no return statement in function returning non-void [-Wreturn-type]
   22 |                         }
      |                         ^
foo.cc: In member function 'void Maximum::displayMessage()':
foo.cc:25:29: error: 'cout' was not declared in this scope
   25 |                             cout << " The largest is " << largest << end1;
      |                             ^~~~
foo.cc:25:29: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:25:70: error: 'end1' was not declared in this scope
   25 |                             cout << " The largest is " << largest << end1;
      |                                                                      ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
1-4 最大值的个数
比赛
2023年新生赛(第一场)
语言
C++
递交时间
2023-08-15 12:58:12
评测时间
2023-08-15 12:58:12
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes