Compile Error

foo.cc: In function 'int main()':
foo.cc:21:2: error: 'cin' was not declared in this scope
   21 |  cin>>a;
      |  ^~~
foo.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    3 | #include <ctime>
  +++ |+#include <iostream>
    4 | using namespace std;
foo.cc:30:8: error: 'cout' was not declared in this scope
   30 |        cout<<x<<endl;
      |        ^~~~
foo.cc:30:8: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:30:17: error: 'endl' was not declared in this scope
   30 |        cout<<x<<endl;
      |                 ^~~~
foo.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
    3 | #include <ctime>
  +++ |+#include <ostream>
    4 | using namespace std;
foo.cc:33:8: error: 'cout' was not declared in this scope
   33 |        cout<<x<<" ";
      |        ^~~~
foo.cc:33:8: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1078 回文数-函数
语言
C++
递交时间
2022-07-14 13:05:49
评测时间
2022-07-14 13:05:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes