Compile Error

foo.cc: In function 'int main()':
foo.cc:6:8: error: 'cin' was not declared in this scope
    6 | int n; cin>>n;
      |        ^~~
foo.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    1 | #include <cmath>
  +++ |+#include <iostream>
    2 | using namespace std;
foo.cc:10:1: error: 'cout' was not declared in this scope
   10 | cout<<GetLength(y)<<endl;
      | ^~~~
foo.cc:10:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:10:21: error: 'endl' was not declared in this scope
   10 | cout<<GetLength(y)<<endl;
      |                     ^~~~
foo.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
    1 | #include <cmath>
  +++ |+#include <ostream>
    2 | using namespace std;
foo.cc: In function 'int GetLength(int)':
foo.cc:22:8: error: 'cin' was not declared in this scope
   22 | int n; cin>>n;
      |        ^~~
foo.cc:22:8: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:26:1: error: 'cout' was not declared in this scope
   26 | cout << (int)len + 1;
      | ^~~~
foo.cc:26:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1035 xf2-2计算阶乘位数
语言
C++
递交时间
2022-07-10 14:48:28
评测时间
2022-07-10 14:48:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes