高手们过来解释一下条件编译!
在书上看了关于条件编译的一节内容
但是由于书本的章幅有限,未解释得很明白
敬请高手们过来帮我解释一下(越具体越好,越基本越好)
拜托了!!
在书上看了关于条件编译的一节内容
但是由于书本的章幅有限,未解释得很明白
敬请高手们过来帮我解释一下(越具体越好,越基本越好)
拜托了!!
版主帮忙解释一下下面这个程序吧!
这里好象还涉及到了递归函数,这使我赶到非常迷惑。
望能指点迷津。
# include <iostream.h> # define DEBUG
int factorial( int num ) { if(num == 0) return 1; else { # if defined(DEBUG) static i; cout<<"call times:"<<++i<<",num = "<<num<<endl; # endif return factorial(num - 1) * num; } } void main() { int number; cout<<"Enter a integer : "; cin>>number; cout<<"The tactorial number : "<<factorial(number)<<endl; }