/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:24: error: 'cin' was not declared in this scope
    6 |  for(int i=1;i<=10;i++)cin>>apple[i];
      |                        ^~~
foo.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | 
foo.cc:7:10: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
    7 |  scanf("%d",h);
      |         ~^  ~
      |          |  |
      |          |  int
      |          int*
foo.cc:7:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    7 |  scanf("%d",h);
      |  ~~~~~^~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1102 陶陶摘苹果
语言
C++
递交时间
2022-07-12 14:16:42
评测时间
2022-07-12 14:16:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes