Identifer not found

This is a discussion on Identifer not found within the C++ Programming forums, part of the General Programming Boards category; In my header file: i have a method: Code: entry.h entry *next; entry *getNext(); when I try to call the ...

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    38

    Identifer not found

    In my header file:

    i have a method:

    Code:
    entry.h
    
    entry *next;
    
    entry *getNext();

    when I try to call the method in my cpp file
    Code:
    entry entry::*getNext()
    {
          return next;
    }
    I get an error identifier not found.

    What am I doing wrong.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    So where is your entry class declaration then?

    Are your declarations in your header file even in a class?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    38
    yes I have included my header file, I just provided the relevant inserts from my code.

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    entry* entry::getNext()

    The * belongs next to the datatype, not somewhere else...
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  3. Puzzled.
    By silhoutte75 in forum C Programming
    Replies: 13
    Last Post: 01-21-2008, 04:17 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21