Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question
100%

#ifndef LLCP_INT_H
#define LLCP_INT_H

#include <iostream>

struct Node
{
int data;
Node *link;
};
void DelOddCopEven(Node*& headPtr);
int FindListLength(Node* headPtr);
bool IsSortedUp(Node* headPtr);
void InsertAsHead(Node*& headPtr, int value);
void InsertAsTail(Node*& headPtr, int value);
void InsertSortedUp(Node*& headPtr, int value);
bool DelFirstTargetNode(Node*& headPtr, int target);
bool DelNodeBefore1stMatch(Node*& headPtr, int target);
void ShowAll(std::ostream& outs, Node* headPtr);
void FindMinMax(Node* headPtr, int& minValue, int& maxValue);
double FindAverage(Node* headPtr);
void ListClear(Node*& headPtr, int noMsg = 0);

// prototype of DelOddCopEven of Assignment 5 Part 1


#endif

Transcribed Image Text:>sh -c make-s ./llcpInt.cpp:22: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 ./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 1 error generated
Transcribed Image Text:1 #include <iostream> 2 #include <cstdlib> 3 #include "llcpInt.h" using namespace std; 45 5 6 7 0056 8 9 10 12345 11 - 12 13 14 15 16 17 18 19 20 void Delodd CopEven (Node* & headPtr) { Node* curr = headPtr; Node* prev = nullptr; 21 ✓ 22 23 24 25 26 27 28 29 } while (curr != nullptr) { } if (curr->data % 2 == 1) { if (prev nullptr) { headPtr = curr->link; delete curr; curr = headPtr; } else { == prev->link = curr->link; delete curr; curr = prev->link; } } else { Node* tmp = new Node(curr->data); tmp->link = curr->link; curr->link = tmp; prev = curr; curr = curr->link;
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
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.
Similar questions
    SEE MORE QUESTIONS
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education