【C++学习】- Recursion(递归)

Resurcion

The usual method is to make the recursive call part of an if statement.

Wtih luck or foresight, tesst eventually becomes false, and the chain of calls is broken.

void recurs(argumentlist) {
	statements1
	if (test)
		recurs(arguments)
	statements2
}

After going into five levels of recursion, the program then has to back out through the same five levels.

上一篇:VMware Tools安装


下一篇:Excel获取第一个表名