Thread: Identifer not found

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

  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,130
    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, 05:17 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM