记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin>>a>>k;
      |         ^~~
      |         std::cin
In file included from stdc++.h:75:
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/iostream:60:18: note: 'std::cin' declared here
   60 |   extern istream cin;           /// Linked to standard input
      |                  ^~~
foo.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << fixed << setprecision(k) << a << endl;
      |         ^~~~
      |         std::cout
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
foo.cc:8:17: error: 'fixed' was not declared in this scope; did you mean 'std::fixed'?
    8 |         cout << fixed << setprecision(k) << a << endl;
      |                 ^~~~~
      |                 std::fixed
In file included from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ios:42,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/istream:38,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/sstream:38,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/complex:45,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ccomplex:39,
                 from stdc++.h:54:
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:1084:3: note: 'std::fixed' declared here
 1084 |   fixed(ios_base& __base)
      |   ^~~~~
foo.cc:8:26: error: 'setprecision' was not declared in this scope; did you mean 'std::setprecision'?
    8 |         cout << fixed << setprecision(k) << a << endl;
      |                          ^~~~~~~~~~~~
      |                          std::setprecision
In file included from stdc++.h:72:
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/iomanip:195:3: note: 'std::setprecision' declared here
  195 |   setprecision(int __n)
      |   ^~~~~~~~~~~~
foo.cc:8:50: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         cout << fixed << setprecision(k) << a << endl;
      |                                                  ^~~~
      |                                                  std::endl
In file included from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/istream:39:
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ostream:688:5: note: 'std::endl' declared here
  688 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1499 Problem A. 四舍五入
语言
C++
递交时间
2023-10-09 20:00:49
评测时间
2023-10-09 20:01:03
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes