C ++中的递归示例 [英] Recursion in c++ with example

查看:81
本文介绍了C ++中的递归示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)带示例的c ++中的递归是什么


2)静态数组和动态数组

1)what is Recursion in c++ with example


2) static array and dynamic array

推荐答案

您应该做自己的作业.如果您无法使用google或教科书的索引来回答这些问题,那么您可能应该放弃课程.如果您决定开始自己的工作,并且有一个特定的问题,无论如何,我们就在这里.
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.


1)递归:请参见递归.
(我在此处 [
1) Recursion: see Recursion.
(I stole it here[^])


C++ example:
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)不,您找不到




2) Nooo, you can''t find that Googling[^].


已在Google中搜索,这是Google搜索链接
Have Searched in Google, Here is the Google Search link
Google[^]

Thanks
--RA


这篇关于C ++中的递归示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆