title: FIFO Queue linked list implementation
body: <p>Here is code in which I am trying to implement a queue using linked list:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  template &lt;class Item&gt;
  class Queue{
  
  public:
      struct  node{
        Item item;node *next;
        node (Item x){
          item=x; next=0;
        }
      };
      typedef node* link;
      link  head, tail;
  
  public:
      Queue(int){  head=0;}
      int empty() const {   return head==0; }
      void put(Item x){
  
          node* t=tail;
          tail=new node(x);
          if (head==0) head=tail;
          else   t-&gt;next=tail;
      }
      Item get(){  
  
          Item v=head-&gt;item;link t=head-&gt;next;
          delete head; head=tail return v;
      }
  
      };
  
  int main(){
      return 0;
  }
  </code></pre>
  
  <p>but I have problems with pointers. For example, when I write <code>Item v = head-&gt;</code> it should   show me option to choose item but it does not show. Also in other place of code after -> this sign code does not give me possibility to choose item or next. Please help.</p>