记录详情

Compile Error

foo.cc:38:9: error: ISO C++ forbids declaration of ‘addNode’ with no type [-fpermissive]
   38 |         addNode(int x){
      |         ^~~~~~~
foo.cc:49:9: error: ISO C++ forbids declaration of ‘output’ with no type [-fpermissive]
   49 |         output(){
      |         ^~~~~~
foo.cc:58:9: error: ISO C++ forbids declaration of ‘destroy’ with no type [-fpermissive]
   58 |         destroy(){
      |         ^~~~~~~
foo.cc: In member function ‘int LinkList::addNode(int)’:
foo.cc:47:9: warning: no return statement in function returning non-void [-Wreturn-type]
   47 |         }
      |         ^
foo.cc: In member function ‘int LinkList::output()’:
foo.cc:56:9: warning: no return statement in function returning non-void [-Wreturn-type]
   56 |         }
      |         ^
foo.cc: In member function ‘int LinkList::destroy()’:
foo.cc:65:9: warning: no return statement in function returning non-void [-Wreturn-type]
   65 |         }
      |         ^

信息

递交者
类型
递交
题目
P1026 OO7-1 链表类的构造、析构
比赛
2024春 面向对象的程序设计方法(第2场作业赛)
语言
C++
递交时间
2024-04-05 09:13:30
评测时间
2024-04-05 09:13:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes