Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "Node.h"
- #include "iomanip"
- Node::Node()
- {
- }
- Node::~Node()
- {
- }
- void Node::AppendFIFO(int id, string userName, string password, string `
- }
- void Node::AppendLIFO(int id, string userName, string password, string fName, string lName)
- {
- //cout << "Yo" << endl;
- Node *curNode;
- curNode = head;
- cout << "user name:" << userName.length();
- cout << "Password:" << password.length();
- cout << "f name:" << fName.length();
- cout << "l name:" << lName.length();
- while (curNode != nullptr)
- {
- curNode = curNode->next;
- }
- }
- void Node:: display()
- {
- }
- #pragma once
- #include "iostream"
- #include "string"
- #include "iomanip"
- using namespace std;
- class Node
- {
- public:
- Node();
- ~Node();
- void AppendFIFO(int, string, string, string, string);
- void AppendLIFO(int, string, string, string, string);
- void display();
- private:
- int ID;
- string userName;
- string password;
- string firstName;
- string lastName;
- Node *next;
- Node *head;
- };
- #include "stdafx.h"
- #include "iostream"
- #include "string"
- #include "Node.h"
- #include "iomanip"
- using namespace std;
- int main()
- {
- Node *LIFO = nullptr;
- Node *FIFO = nullptr;
- //The 10 users information for LIFO
- LIFO->AppendLIFO(10, "postMalone", "Asdkc34D", "Austin", "Post");
- LIFO->AppendLIFO(9, "h20", "akdjW78v", "Benny", "Washington");
- LIFO->AppendLIFO(8, "testing", "aklc5kaS", "Timmy", "Trump");
- LIFO->AppendLIFO(7, "Rob-by", "robby3939", "Robert", "Malone");
- LIFO->AppendLIFO(6, "TracyLMoore", "Moore098", "Tracy", "Moore");
- LIFO->AppendLIFO(5, "Billybill", "Bb234", "Bill", "Prescott");
- LIFO->AppendLIFO(4, "beth-09", "09ASDN", "Beth", "Richards");
- LIFO->AppendLIFO(3, "Gabe123", "123ilkkSW", "Gabriel", "Smith");
- LIFO->AppendLIFO(2, "sthomas", "sthom56712", "Shannon", "Thomas");
- LIFO->AppendLIFO(1, "bob", "LKJG840", "Bobby", "Steve");
- LIFO->AppendLIFO(0, "zmoore00", "00SDJ", "Zackary", "Moore");
- //The 10 users information for FIFO
- FIFO->AppendFIFO(10, "postMalone", "Asdkc34D", "Austin", "Post");
- FIFO->AppendFIFO(9, "h20", "akdjW78v", "Benny", "Washington");
- FIFO->AppendFIFO(8, "testing", "aklc5kaS", "Timmy", "Trump");
- FIFO->AppendFIFO(7, "Rob-by", "robby3939", "Robert", "Malone");
- FIFO->AppendFIFO(6, "TracyLMoore", "Moore098", "Tracy", "Moore");
- FIFO->AppendFIFO(5, "Billybill", "Bb234", "Bill", "Prescott");
- FIFO->AppendFIFO(4, "beth-09", "09ASDN", "Beth", "Richards");
- FIFO->AppendFIFO(3, "Gabe123", "123ilkkSW", "Gabriel", "Smith");
- FIFO->AppendFIFO(2, "sthomas", "sthom56712", "Shannon", "Thomas");
- FIFO->AppendFIFO(1, "bob", "LKJG840", "Bobby", "Steve");
- FIFO->AppendFIFO(0, "zmoore00", "00SDJ", "Zackary", "Moore");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement