记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout << ans << endl;
      |         ^~~~
      |         std::cout
In file included from /in/foo.cc:1:
/usr/include/c++/12/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
/in/foo.cc:14:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |         cout << ans << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/12/iostream:39:
/usr/include/c++/12/ostream:688:5: note: 'std::endl' declared here
  688 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~

信息

递交者
类型
自测
语言
C++
递交时间
2025-02-22 19:21:49
评测时间
2025-02-22 19:21:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes