记录详情

Compile Error

/in/foo.cc:9:8: error: invalid use of non-static data member 'polylist::n'
  int a[n],b[n];
        ^
/in/foo.cc:8:6: note: declared here
  int n;
      ^
/in/foo.cc:9:13: error: invalid use of non-static data member 'polylist::n'
  int a[n],b[n];
             ^
/in/foo.cc:8:6: note: declared here
  int n;
      ^
/in/foo.cc:11:17: error: invalid use of non-static data member 'polylist::n'
  polylist(int a[n],int b[n],int x)
                 ^
/in/foo.cc:8:6: note: declared here
  int n;
      ^
/in/foo.cc:11:19: error: expected ')' before ',' token
  polylist(int a[n],int b[n],int x)
                   ^
/in/foo.cc:11:20: error: expected unqualified-id before 'int'
  polylist(int a[n],int b[n],int x)
                    ^~~
/in/foo.cc:28:1: error: expected '}' at end of input
 }
 ^
/in/foo.cc:10:10: error: expected unqualified-id at end of input
  int x,s=0;
          ^

信息

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