记录详情

Compile Error

/in/foo.cc:25:19: error: stray '\357' in program
  else if (c.i == 0){cout << c.r << endl;}
                   ^
/in/foo.cc:25:20: error: stray '\274' in program
  else if (c.i == 0){cout << c.r << endl;}
                    ^
/in/foo.cc:25:21: error: stray '\211' in program
  else if (c.i == 0){cout << c.r << endl;}
                     ^
/in/foo.cc:26:17: error: stray '\357' in program
  else if (c.i <0){cout << c.r << c.i << "i" << endl;}
                 ^
/in/foo.cc:26:18: error: stray '\274' in program
  else if (c.i <0){cout << c.r << c.i << "i" << endl;}
                  ^
/in/foo.cc:26:19: error: stray '\211' in program
  else if (c.i <0){cout << c.r << c.i << "i" << endl;}
                   ^
/in/foo.cc:44:27: error: stray '\357' in program
  for (int i = 0; i < 3;i++){
                           ^
/in/foo.cc:44:28: error: stray '\274' in program
  for (int i = 0; i < 3;i++){
                            ^
/in/foo.cc:44:29: error: stray '\211' in program
  for (int i = 0; i < 3;i++){
                             ^
/in/foo.cc:45:32: error: stray '\357' in program
   for (int j = 0; j < 2 - i;j++){
                                ^
/in/foo.cc:45:33: error: stray '\274' in program
   for (int j = 0; j < 2 - i;j++){
                                 ^
/in/foo.cc:45:34: error: stray '\211' in program
   for (int j = 0; j < 2 - i;j++){
                                  ^
/in/foo.cc:50:28: error: stray '\357' in program
  for (int i = 0; i < 3; i++){
                            ^
/in/foo.cc:50:29: error: stray '\274' in program
  for (int i = 0; i < 3; i++){
                             ^
/in/foo.cc:50:30: error: stray '\211' in program
  for (int i = 0; i < 3; i++){
                              ^
/in/foo.cc: In constructor 'Complex::Complex(int, int)':
/in/foo.cc:6:63: error: expected ';' before '}' token
    Complex(int r, int i){this->r = r; this->i = i; mod=r*r+i*i};
                                                               ^
/in/foo.cc: In function 'void output(Complex&)':
/in/foo.cc:25:22: error: expected ')' before '{' token
  else if (c.i == 0){cout << c.r << endl;}
                      ^
/in/foo.cc:28:1: error: expected primary-expression before '}' token
 }
 ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:44:30: error: expected ')' before '{' token
  for (int i = 0; i < 3;i++){
                              ^
/in/foo.cc:45:35: error: expected ')' before '{' token
   for (int j = 0; j < 2 - i;j++){
                                   ^
/in/foo.cc:50:31: error: expected ')' before '{' token
  for (int i = 0; i < 3; i++){
                               ^

信息

递交者
类型
递交
题目
P1012 OO2-2 复数类的比较运算符重载
比赛
2024春 面向对象的程序设计方法(第2场作业赛)
语言
C++
递交时间
2024-04-05 21:19:49
评测时间
2024-04-05 21:19:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes