[ create a new paste ] login | about

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

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

void test(char c) {
    printf("Got character %c\n", c);
}

void test(const char* c) {
    printf("Got string %s\n", c);
}

int main() {
    test('c');
    test("c");
}


Output:
1
2
Got character c
Got string c


Create a new paste based on this one


Comments: