Advertisement
Mikhail-Podbolotov

Untitled

Apr 24th, 2024
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #pragma once
  2. using namespace std;
  3. #include <fstream>
  4. struct Node {
  5.     int number;
  6.     Node* Previos = nullptr;
  7. };
  8.  
  9. class Stack {
  10. private:
  11.     Node* Top;
  12. public:
  13.     Stack();
  14.     ~Stack();
  15.     void push(int n);
  16.     bool isEmpty();
  17.     int pop();
  18. };
  19.  
  20. class Queue {
  21. private:
  22.     Stack stack1;
  23.     Stack stack2;
  24. public:
  25.     void enter(int n);
  26.     int Delete();
  27.     bool isEmpty();
  28.     void Read(std::ifstream& file1);
  29.     void Print(std::ofstream& file2);
  30. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement