[ create a new paste ] login | about

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

johannes - C++, pasted on Nov 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

int takeThisInt()
{
    return 123;
}

int main()
{
    int (*p)() = &takeThisInt;
    int x = p();
    std::cout << x << std::endl;
    return 0;
}


Output:
1
123


Create a new paste based on this one


Comments: