Course Solutions Uncategorized (Solved) : C Please Update Code Please Change Code Using Class Instead Source Code Include Using Name Q29501810 . . . .

(Solved) : C Please Update Code Please Change Code Using Class Instead Source Code Include Using Name Q29501810 . . . .

 

C++ Please update code: Please change code so that it is usingthe <list> class instead.

Source Code:

#include <iostream>

using namespace std;

struct Item {   // declare variables

  Item *previous; // pointer

  char aChar;

  Item *next; // link

};

void push(Item **top, string str, int a) { // pushing ontostack

  int i;

  char aChar;

  for (i = 0; i < a; i++) {

    aChar = str[i]; // setting char var to aposition in the string

    Item *new_top = new Item;

    new_top->aChar = aChar;

    new_top->previous = 0;

    new_top->next = (*top);

    (*top)->previous = new_top;

    (*top) = new_top;

  }

}

void printL(const Item *h, int a) { // prints the reversedlist

  int i = 0;

  for (const Item *p = h; i < a; p = p->next){

    cout <<

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post