[ create a new paste ] login | about

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

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

int main() {
    int id = 2;
    const char *errors[] = {
        "I'm fine",
        "The cake is a lie",
        "File not found",
    };
    printf("Error %d: %s.\n", id, errors[id]);
    std::cout << "Error " << id << ": " << errors[id] << "." << std::endl;
}


Output:
1
2
Error 2: File not found.
Error 2: File not found.


Create a new paste based on this one


Comments: