Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
1)what is Recursion in c++ with example


2) static array and dynamic array
Posted

You should do your own homework. If you can't use google or the index of your textbook to answer these questions, then you probably should drop your course. If you decide to start working on your own work and have a specific question, by all means, we are here for that.
 
Share this answer
 
Comments
Lakamraju Raghuram 1-Feb-12 0:59am    
Perfect.
+5
1) Recursion: see Recursion.
(I stole it here[^])


C++ example:
C++
string ask_that_question(Folk * pf)
{
  if ( ! pf )
  {
    return "sorry, no cookie for you.";
  }
  else if ( pf->name() == "Carlo")
  {
    return pf->silly_answer();
  }
  else
  {
    return ask_that_question( pf->nearby_folk() );
  )
}



2) Nooo, you can't find that Googling[^].
 
Share this answer
 
Comments
Chandrasekharan P 1-Feb-12 6:27am    
A 5 for this. and you have given him an example also :)
Cheers
CPallini 1-Feb-12 6:44am    
Thank you.
Have Searched in Google, Here is the Google Search link
Google[^]

Thanks
--RA
 
Share this answer
 
From the 'Ask a Question' rules (emphasis mine):

1. Have you searched or Googled for a solution?
2. Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with.
3. Keep the subject brief but descriptive. eg "How do I change the dialog colour?"
4. Keep the question as concise as possible. If you have to include code, include the smallest snippet of code you can - do not dump your entire codebase.
5. Tag your question appropriately.
6. Your question may be edited or retagged by others. Anything inappropriate will be removed.
7. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
8. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
9. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read.
10. Do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will get you kicked off and banned. Play nice.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900