Compile Error

foo.cc: In function ‘int main()’:
foo.cc:7:5: error: ‘cin’ was not declared in this scope
    7 |     cin>>a>>b;
      |     ^~~
foo.cc:2:1: note: ‘std::cin’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
    1 | #include <bit>
  +++ |+#include <iostream>
    2 | 
foo.cc:8:9: error: ‘cout’ was not declared in this scope
    8 |         cout<<20/(3.14159*a*b*b);
      |         ^~~~
foo.cc:8:9: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’

信息

递交者
类型
自测
题目
P1000 大象喝水
语言
C++
递交时间
2025-08-09 18:56:07
评测时间
2025-08-09 18:56:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes