记录详情

Compile Error

foo.cc:2:7: error: expected nested-name-specifier before 'namepsace'
    2 | using namepsace std;
      |       ^~~~~~~~~
foo.cc: In function 'int sushu(int, int, int)':
foo.cc:4:16: error: 'n' was not declared in this scope
    4 | for(int i=2;i<=n;i++){
      |                ^
foo.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | cout<<c<<"="<<a<<"+"<<b;
      | ^~~~
      | std::cout
In file included from foo.cc:1:
/usr/include/c++/9/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;  /// Linked to standard output
      |                  ^~~~
foo.cc:9:11: error: a function-definition is not allowed here before '{' token
    9 | int main(){
      |           ^
foo.cc:12:16: error: expected '}' at end of input
   12 |    sushu(x,y,z);
      |                ^
foo.cc:3:29: note: to match this '{'
    3 | int sushu(int a,int b,int c){
      |                             ^
foo.cc:12:16: warning: no return statement in function returning non-void [-Wreturn-type]
   12 |    sushu(x,y,z);
      |                ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-4 素数专题:验证哥德巴赫猜想
比赛
2022暑期青少年社团(入门赛)
语言
C++
递交时间
2022-07-28 21:31:13
评测时间
2022-07-28 21:31:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes