记录详情

Compile Error

foo.cc:7:25: error: extended character “ is not valid in an identifier
    7 |         ~Node(){cout << “~Node()" << data << endl;};
      |                         ^
foo.cc:7:33: warning: missing terminating " character
    7 |         ~Node(){cout << “~Node()" << data << endl;};
      |                                 ^
foo.cc:7:33: error: missing terminating " character
    7 |         ~Node(){cout << “~Node()" << data << endl;};
      |                                 ^~~~~~~~~~~~~~~~~~~~
foo.cc:42:31: error: extended character “ is not valid in an identifier
   42 |           ~LinkList(){cout << “~LinkList()" << endl;};
      |                               ^
foo.cc:42:43: warning: missing terminating " character
   42 |           ~LinkList(){cout << “~LinkList()" << endl;};
      |                                           ^
foo.cc:42:43: error: missing terminating " character
   42 |           ~LinkList(){cout << “~LinkList()" << endl;};
      |                                           ^~~~~~~~~~~~
foo.cc:56:2: error: expected ‘}’ at end of input
   56 | }
      |  ^
foo.cc:9:16: note: to match this ‘{’
    9 | class LinkList {
      |                ^
foo.cc:56:2: error: expected unqualified-id at end of input
   56 | }
      |  ^
foo.cc:56:2: error: expected ‘}’ at end of input
foo.cc:3:12: note: to match this ‘{’
    3 | class Node {
      |            ^
foo.cc: In destructor ‘Node::~Node()’:
foo.cc:7:25: error: ‘“’ was not declared in this scope
    7 |         ~Node(){cout << “~Node()" << data << endl;};
      |                         ^
foo.cc: In constructor ‘Node::LinkList::LinkList(int, int*)’:
foo.cc:26:45: error: expected ‘)’ before ‘)’
   26 |                   for (int i = 1; i < n; i++) {
      |                                             ^~
foo.cc:26:23: note: to match this ‘(’
   26 |                   for (int i = 1; i < n; i++) {
      |                       ^
foo.cc:26:45: error: ‘)’ was not declared in this scope
   26 |                   for (int i = 1; i < n; i++) {
      |                                             ^~
foo.cc:25:25: warning: unused variable ‘n1’ [-Wunused-variable]
   25 |                   Node* n1=head;
      |                         ^~
foo.cc: In destructor ‘Node::LinkList::~LinkList()’:
foo.cc:42:31: error: ‘“’ was not declared in this scope
   42 |           ~LinkList(){cout << “~LinkList()" << endl;};
      |                               ^
foo.cc: In member function ‘int Node::LinkList::main()’:
foo.cc:49:35: error: expected ‘)’ before ‘)’
   49 |         for (int i = 0; i < n; i++){
      |                                   ^~
foo.cc:49:13: note: to match this ‘(’
   49 |         for (int i = 0; i < n; i++){
      |             ^
foo.cc:49:35: error: ‘)’ was not declared in this scope
   49 |         for (int i = 0; i < n; i++){
      |                                   ^~
foo.cc: At global scope:
foo.cc:56:2: error: expected unqualified-id at end of input
   56 | }
      |  ^

信息

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