#include #include #include "llcpInt.h" using namespace std; void DelOddCopEven (Node*& headPtr) { Node* curr = headPtr; Node* prev = nullptr; } day while (curr != nullptr) { } if (curr->data % 2 == 1) { if (prev == nullptr) { headPtr = curr->next; delete curr; curr = headPtr; } else { prev->next = curr->next; delete curr; curr = prev->next; } } else { Node* tmp = new Node(curr->data); tmp->next = curr->next; curr->next = tmp; prev = curr; curr = curr->next;
#include #include #include "llcpInt.h" using namespace std; void DelOddCopEven (Node*& headPtr) { Node* curr = headPtr; Node* prev = nullptr; } day while (curr != nullptr) { } if (curr->data % 2 == 1) { if (prev == nullptr) { headPtr = curr->next; delete curr; curr = headPtr; } else { prev->next = curr->next; delete curr; curr = prev->next; } } else { Node* tmp = new Node(curr->data); tmp->next = curr->next; curr->next = tmp; prev = curr; curr = curr->next;
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%

Transcribed Image Text:./llcpInt.cpp:12:33: error: no member named 'next' in 'Node'
headPtr = curr->next;
NNNN
./llcpInt.cpp:16:23: error: no member named 'next' in 'Node'
prev->next = curr->next;
NNNN
./llcpInt.cpp:16:36: error: no member named 'next' in 'Node'
prev->next = curr->next;
./llcpInt.cpp:18:30: error: no member named 'next' in 'Node'
curr = prev->next;
NNNN
./llcpInt.cpp:21:29: error: no matching constructor for initialization of 'Node'
Node* tmp = new Node(curr->data);
សសសសសសសសសស
./llcpInt.h:6:8: note: candidate constructor (the implicit copy constructor) not viable
: no known conversion from 'int' to 'const Node' for 1st argument
struct Node
NNN
NNNN
./llcpInt.h:6:8: note: candidate constructor (the implicit move constructor) not viable
: no known conversion from 'int' to 'Node' for 1st argument
./llcpInt.h:6:8: note: candidate constructor (the implicit default constructor) not via
ble: requires arguments, but 1 was provided
./llcpInt.cpp:22:18: error: no member named 'next' in 'Node'
tmp->next = curr->next;
./llcpInt.cpp:22:31: error: no member named 'next' in 'Node'
tmp->next = curr->next;
NNNN
NNNN
./llcpInt.cpp:23:19: error: no member named 'next' in 'Node'
curr->next = tmp;
NNNN
./llcpInt.cpp:25:26: error: no member named 'next' in 'Node'
curr = curr->next;

Transcribed Image Text:1 #include <iostream>
2 #include <cstdlib>
3 #include "llcpInt.h"
4 using namespace std;
5 void DeloddCopEven (Node*& headptr) {
Node* curr = headPtr;
Node* prev = nullptr;
1.0
6
7 ✓
8 ✔
9 ✓
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 ✓
O 00
29 }
I
while (curr != nullptr) {
}
if (curr->data % 2 == 1) {
if (prev== nullptr) {
}
} else {
}
headPtr = curr->next;
delete curr;
curr = headPtr;
} else {
prev->next = curr->next;
delete curr;
curr = prev->next;
Node* tmp = new Node(curr->data);
tmp->next = curr->next;
curr->next = tmp;
prev = curr;
curr = curr->next;
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education