"struct has no member named..." Linked List

Hi there
Making a linked list, and having trouble inserting the first element.
Here's the part of the header file I'm working with.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//... public functions ...
  private:
           
      struct Node {
         value_type value;
         Node* next;
         Node* previous;
      };
      
      Node* head;
      Node* tail;
      Node* cursor;
      
 };
}


and here's the definition of my 'insert' function:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
     void List_3358::insert ( const value_type & item )

      {
          Node FNG;
          FNG.value = item;
          
          if (isEmpty())
          
          {
              head -> FNG;
              FNG.previous -> head;
              FNG.next -> tail;
              cursor -> FNG;
     cout << "there's one in the list.  It's " << item;
          }
          
      }


The error I'm getting is
"struct Node has no member named /*(FNG, head, tail, cursor..)*/"

Why would the Node struct need to have the member FNG? I'm not getting a compiler complaint when I create a Node named FNG, so what am I telling it that it doesn't like?
Thanks!
Topic archived. No new replies allowed.