记录详情

Compile Error

/in/foo.cc:24:2: error: expected unqualified-id before 'for'
  for(i=0;i<Poly.n;i++)
  ^~~
/in/foo.cc:24:10: error: 'i' does not name a type
  for(i=0;i<Poly.n;i++)
          ^
/in/foo.cc:24:19: error: 'i' does not name a type
  for(i=0;i<Poly.n;i++)
                   ^
/in/foo.cc:28:2: error: 'result1' does not name a type
  result1=result1+b[i]*Poly.a[i][0];
  ^~~~~~~
/in/foo.cc:29:2: error: 'cout' does not name a type
  cout<<result1<<endl;
  ^~~~
/in/foo.cc: In member function 'int PolyList::input()':
/in/foo.cc:14:8: error: 'Poly' was not declared in this scope
   cin>>Poly.n;
        ^~~~
/in/foo.cc:19:2: warning: no return statement in function returning non-void [-Wreturn-type]
  }
  ^
/in/foo.cc: In member function 'void PolyList::calculate()':
/in/foo.cc:22:17: error: 'Poly' was not declared in this scope
   for(int s=0;s<Poly.n;s++){b[s]=1;}
                 ^~~~
/in/foo.cc:21:7: warning: unused variable 'i' [-Wunused-variable]
   int i,j;
       ^
/in/foo.cc:21:9: warning: unused variable 'j' [-Wunused-variable]
   int i,j;
         ^

信息

递交者
类型
递交
题目
P1021 OO5-1 一元多项式类的求值
比赛
《面向对象的程序设计方法》的课程测验
语言
C++
递交时间
2021-06-22 11:59:13
评测时间
2021-06-22 11:59:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes