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

(Solved) : Https Wwwcheggcom Homework Help Questions Answers Hi Im Trying Build C Program Change Stri Q29649414 . . . .(Solved) : Https Wwwcheggcom Homework Help Questions Answers Hi Im Trying Build C Program Change Stri Q29649414 . . . .

<p>https://www.chegg.com/homework-help/questions-and-answers/hi-im-trying-build-c-program-change-string-he2lo-hello--example-needs-able-achieve-result--q29646864</p><p>Could some one please please give me an in depth line by lineexplanation of whats happening in the above solution, especiallythis part====> (str[i]-'0'); i'm having real troubleunderstanding this.</p><p>This is the