记录详情

Compile Error

foo.cc: In member function ‘void PolyLinkList::insert(int, int)’:
foo.cc:25:20: error: ‘current’ was not declared in this scope
   25 |                 if(current->next&&current->next->b==b){
      |                    ^~~~~~~
foo.cc: In function ‘int evaluate(int)’:
foo.cc:41:33: error: ‘head’ was not declared in this scope
   41 |         PolyLinkNode* current = head;
      |                                 ^~~~
foo.cc: At global scope:
foo.cc:52:5: error: declaration of ‘~ PolyLinkList’ as non-member
   52 |     ~PolyLinkList(){
      |     ^~~~~~~~~~~~~
foo.cc:59:1: error: expected declaration before ‘}’ token
   59 | };
      | ^
foo.cc: In function ‘int main()’:
foo.cc:71:13: error: ‘class PolyLinkList’ has no member named ‘evaluate’
   71 |     cout<<P.evaluate(x)<<endl;
      |             ^~~~~~~~

信息

递交者
类型
自测
语言
C++
递交时间
2025-04-12 15:56:57
评测时间
2025-04-12 15:56:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes