记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a>>b;
      |         ^~~
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:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<c<<endl;
      |         ^~~~
foo.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:8:18: error: 'endl' was not declared in this scope
    8 |         cout<<c<<endl;
      |                  ^~~~
foo.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
foo.cc:11:13: error: redeclaration of 'int a'
   11 |         int a,b,c;
      |             ^
foo.cc:5:9: note: 'int a' previously declared here
    5 |     int a,b,c;
      |         ^
foo.cc:11:15: error: redeclaration of 'int b'
   11 |         int a,b,c;
      |               ^
foo.cc:5:11: note: 'int b' previously declared here
    5 |     int a,b,c;
      |           ^
foo.cc:11:17: error: redeclaration of 'int c'
   11 |         int a,b,c;
      |                 ^
foo.cc:5:13: note: 'int c' previously declared here
    5 |     int a,b,c;
      |             ^
foo.cc:17:13: error: redeclaration of 'int a'
   17 |         int a,b,c;
      |             ^
foo.cc:5:9: note: 'int a' previously declared here
    5 |     int a,b,c;
      |         ^
foo.cc:17:15: error: redeclaration of 'int b'
   17 |         int a,b,c;
      |               ^
foo.cc:5:11: note: 'int b' previously declared here
    5 |     int a,b,c;
      |           ^
foo.cc:17:17: error: redeclaration of 'int c'
   17 |         int a,b,c;
      |                 ^
foo.cc:5:13: note: 'int c' previously declared here
    5 |     int a,b,c;
      |             ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1078 xf1-1两数和、积、余
语言
C++
递交时间
2022-08-27 08:26:14
评测时间
2022-08-27 08:26:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes