记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout<<"请输入要验证的偶数(该数>=6):";
      |                 ^~~~
foo.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    2 | #include<cmath>
  +++ |+#include <iostream>
    3 | using namespace std;
foo.cc:20:17: error: 'cin' was not declared in this scope
   20 |                 cin>>a;
      |                 ^~~
foo.cc:20:17: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:45:55: error: 'endl' was not declared in this scope
   45 |                                                 cout<<endl;//每4个换行
      |                                                       ^~~~
foo.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
    2 | #include<cmath>
  +++ |+#include <ostream>
    3 | using namespace std;
foo.cc: In function 'bool shushu(int)':
foo.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | } //判断质数的函数
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-4 素数专题:验证哥德巴赫猜想
比赛
2023年新生赛(第一场)
语言
C++
递交时间
2023-08-15 13:08:01
评测时间
2023-08-15 13:08:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes