[ create a new paste ] login | about

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

C++, pasted on Dec 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<iostream>

using namespace std;

int N = 10; 

  

int main() 
{ 

  static int x = 1; 

  if (cout << x << " " && x++ < N && main()) 

  { } 

  return 0; 
}


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


Create a new paste based on this one


Comments: