Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // QUEUE TABLICOWE.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "global.h"
  6.  
  7. #include <iostream>
  8. using namespace std;
  9.  
  10. int main(int argc, char* argv[])
  11. {
  12.  
  13. Queue* pHead = Create(10);
  14.  
  15. EnQueue(pHead, 5);
  16. EnQueue(pHead, 2);
  17. EnQueue(pHead, 10);
  18. EnQueue(pHead, 15);
  19. EnQueue(pHead, 20);
  20.  
  21. DeQueue(pHead);
  22.  
  23. for( int i=0; i<10; i++)
  24. cout << pHead->Tab[i] << endl;
  25.  
  26. //cout << pHead->CurrentSize << endl;
  27. //cout << pHead->pHead;
  28.  
  29. Del(&pHead);
  30.  
  31. pHead = Create(10);
  32.  
  33. EnQueue(pHead, 5);
  34.  
  35. cout << "\n\n";
  36.  
  37. for( int i=0; i<10; i++)
  38. cout << pHead->Tab[i] << endl;
  39.  
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement