PLEASE HOW DO I FIX THE ERRORS AND COMPLETE THIS C PROGRAM I

PLEASE HOW DO I FIX THE ERRORS AND COMPLETE THIS C++ PROGRAM IN A LOOP?

#include <iostream>

using namespace std;

struct st
{
    char ch;
    st *next;
};

class stack
{
public:
    stack();
    ~stack();
    void push(??);
    ?? pop();
   
private:
    st *top;
};

void stack::push(char c)
{
    stack ob1;
    char ch1;
   
    if !(is full())
        cin >> chl;
    ob1 push(ch1);
}

if !(is empty())
{
    ch1 = ob1.pop();
}

void stack::push(char c)
{
    temp->ch = c;
    temp->next = top;
    top = temp;
}

char stack::push()
{
    char t;
    t = top->ch;
   
    return (top->ch)
}

char stack::pop()
{
    st *temp;
    temp = top;
    top = top;
    t = temp->ch;
    delete temp;
    return t;
}

Solution

#include <iostream>

using namespace std;

struct st
{
    char ch;
    st *next;
};

class stack
{
public:
    stack();
    ~stack();
    void push(??);
    ?? pop();
    
private:
    st *top;
};

void stack::push(char c)
{
    stack ob1;
    char ch1;
    
    if !(is full())
        cin >> chl;
    ob1 push(ch1);
}

if !(is empty())
{
    ch1 = ob1.pop();
}

void stack::push(char c)
{
    temp->ch = c;
    temp->next = top;
    top = temp;
}

char stack::push()
{
    char t;
    t = top->ch;
    
    return (top->ch)
}

char stack::pop()
{
    st *temp;
    temp = top;
    top = top;
    t = temp->ch;
    delete temp;
    return t;
}

PLEASE HOW DO I FIX THE ERRORS AND COMPLETE THIS C++ PROGRAM IN A LOOP? #include <iostream> using namespace std; struct st { char ch; st *next; }; class s
PLEASE HOW DO I FIX THE ERRORS AND COMPLETE THIS C++ PROGRAM IN A LOOP? #include <iostream> using namespace std; struct st { char ch; st *next; }; class s
PLEASE HOW DO I FIX THE ERRORS AND COMPLETE THIS C++ PROGRAM IN A LOOP? #include <iostream> using namespace std; struct st { char ch; st *next; }; class s

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site