• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Use of undeclared identifier that is declared

 
Ranch Hand
Posts: 79
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys,
I am having some problems with the following piece of code



is giving me a compiler error "Use of Undeclared identifier "ParseName"
But it is declared in the parse.cpp as followed




What am I missing?

Thank you,
 
Rancher
Posts: 510
15
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pat

Looking at your parse.h file, parseName() is declared as a method of the Parse class. So I would expect to see it being used in something like:
where obj is a variable of class Parse. You are calling it as if it's a 'normal' function, not a method, and there isn't one called parseName.
 
Pat Watson
Ranch Hand
Posts: 79
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much John, that was my problem. I had to take it outside of the class. I actually did not know that I could do that so this was learning experience. Thanks again
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic