Question: Complete the WebsiteNode class destructor. The destructor prints Deallocating WebsiteNode (, followed by the value of traffic, a space, and the value of links, and

Complete the WebsiteNode class destructor. The destructor prints "Deallocating WebsiteNode (", followed by the value of traffic, a space, and the value of links, and then ")". End with a newline.

Ex: If the input is 1855 43, then the output is:

#include using namespace std;

class WebsiteNode { public: WebsiteNode(int trafficValue, int linksValue) { traffic = trafficValue; links = linksValue; } /* Your code goes here */ int traffic; int links; WebsiteNode* next; };

int main() { WebsiteNode* myWebsite; int inputValue1; int inputValue2;

cin >> inputValue1; cin >> inputValue2;

myWebsite = new WebsiteNode(inputValue1, inputValue2); delete myWebsite; return 0; }

c++ and please please make it correct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!