[ create a new paste ] login | about

Link: http://codepad.org/DCKl87Xv    [ raw code | output | fork ]

C++, pasted on Jun 5:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>

int i = 10;

int main(){
	if(i){
		printf("%d\n", i--);
		main();
	}
	
	return i;
}


Output:
1
2
3
In function 'int main()':
Line 8: error: ISO C++ forbids taking address of function '::main'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: