Guest User

Untitled

a guest
Feb 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. void Word::Print(ostream& os)
  2. {
  3.     int temp1 = 0;
  4.     int temp2 = 0;
  5.     temp1 = q.RemoveFromHead();
  6.     if (temp1 != 0)
  7.     {
  8.         os << word << '\t' << '\t';
  9.         os << temp1 << ' ';
  10.         while (!q.IsEmpty())
  11.         {  
  12.             temp2 = q.RemoveFromHead();
  13.             if (temp1 != temp2)
  14.             {
  15.                 if (temp2 != 0)
  16.                 {
  17.                     temp1 = temp2;
  18.                     os << temp1 << ' ';
  19.                 }
  20.             }
  21.         }
  22.         os << endl;
  23.     }
  24. }
Add Comment
Please, Sign In to add comment