By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,820 Members | 1,187 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,820 IT Pros & Developers. It's quick & easy.

HELP!! method calling...

P: 21
So what i am trying to do is call a method with in a method.

Example:
Expand|Select|Wrap|Line Numbers
  1. void printBooks()
  2. {
  3.     ....
  4.     findRelavant()
  5. }
  6. void findRelavant()
  7. {
  8. ....
  9. }
  10.  
Is this posible or do i have to do something else????

I tried it in my code and got 3 error messages.
1. error C3861: 'findRelevant': identifier not found
2. error C2365: 'findRelevant' : redefinition; previous definition was 'formerly unknown identifier
3. error C3861: 'findRelevant': identifier not found

Please Help
Sep 26 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 180
So what i am trying to do is call a method with in a method.

Example:
Expand|Select|Wrap|Line Numbers
  1. void printBooks()
  2. {
  3.     ....
  4.     findRelavant()
  5. }
  6. void findRelavant()
  7. {
  8. ....
  9. }
  10.  
Is this posible or do i have to do something else????

I tried it in my code and got 3 error messages.
1. error C3861: 'findRelevant': identifier not found
2. error C2365: 'findRelevant' : redefinition; previous definition was 'formerly unknown identifier
3. error C3861: 'findRelevant': identifier not found

Please Help
You need to first declare 'findRelevant' before it can be used lise


Expand|Select|Wrap|Line Numbers
  1. void findRelavant();
  2. void printBooks()
  3. {
  4.     ....
  5.     findRelavant()
  6. }
  7. void findRelavant()
  8. {
  9. ....
  10. }
  11.  
Sep 26 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.