[ create a new paste ] login | about

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

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

void foo(unsigned short x)
{
 puts("x is a unsigned short");
}

void foo(int x)
{
 puts("x is an int");
}

int main()
{
 unsigned short x = 5;
 foo(x);
 foo(+x);
}


Output:
1
2
x is a unsigned short
x is an int


Create a new paste based on this one


Comments: