Compile Error

foo.cc: In function 'int main()':
foo.cc:11:8: error: expected ';' before 'true'
   flag true;
        ^~~~
foo.cc:11:12: warning: statement has no effect [-Wunused-value]
   flag true;
            ^
foo.cc:10:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=2;i<n;i++)
  ^~~
foo.cc:12:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   for(int j=2;j*j<=i;j++)
   ^~~
foo.cc:12:20: error: 'i' was not declared in this scope
   for(int j=2;j*j<=i;j++)
                    ^
foo.cc:20:11: error: 'falese' was not declared in this scope
   if(flag=falese)
           ^~~~~~
foo.cc:20:11: note: suggested alternative: 'fclose'
   if(flag=falese)
           ^~~~~~
           fclose
foo.cc:22:6: error: 'i' was not declared in this scope
    x[i]=0;
      ^
foo.cc:23:4: error: continue statement not within a loop
    continue;
    ^~~~~~~~
foo.cc:32:14: error: 'j' was not declared in this scope
    if(x[n-(i+j)]!=1) continue;
              ^
foo.cc:33:18: error: 'j' was not declared in this scope
    cout<<i<<" "<<j<<" "<<n-(i+j)<<endl;
                  ^
foo.cc:37:11: error: break statement not within loop or switch
   if(flag)break;
           ^~~~~
foo.cc: At global scope:
foo.cc:39:5: error: expected unqualified-id before 'return'
     return 0;
     ^~~~~~
foo.cc:40:1: error: expected declaration before '}' token
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1109 哥德巴赫猜想(2)
语言
C++
递交时间
2021-11-27 15:19:05
评测时间
2021-11-27 15:19:05
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes