记录详情

Compile Error

/in/foo.cc:57:5: error: expected ';' after class definition
     }
     ^
/in/foo.cc: In member function 'void PolyList::Insert(PolyNode*)':
/in/foo.cc:50:11: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
         } else
           ^~~~
/in/foo.cc:52:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
             if (prev == NULL)
             ^~
/in/foo.cc: In function 'void Add(PolyList&)':
/in/foo.cc:60:30: error: 'PolyNode* PolyList::head' is private within this context
         for (PolyNode *p = L.head; p != NULL; p = p->next) {
                              ^~~~
/in/foo.cc:24:15: note: declared private here
     PolyNode *head;
               ^~~~
/in/foo.cc:62:24: error: 'Insert' was not declared in this scope
             Insert(newp);
                        ^
/in/foo.cc: At global scope:
/in/foo.cc:65:5: error: 'friend' used outside of class
     friend ostream &operator<<(ostream &o, PolyList &L) {
     ^~~~~~
/in/foo.cc: In function 'std::ostream& operator<<(std::ostream&, PolyList&)':
/in/foo.cc:66:30: error: 'PolyNode* PolyList::head' is private within this context
         for (PolyNode *p = L.head; p != NULL; p = p->next)
                              ^~~~
/in/foo.cc:24:15: note: declared private here
     PolyNode *head;
               ^~~~
/in/foo.cc: At global scope:
/in/foo.cc:70:1: error: expected declaration before '}' token
 };
 ^

信息

递交者
类型
自测
语言
C++
递交时间
2019-03-17 21:13:18
评测时间
2019-03-17 21:13:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes