[ create a new paste ] login | about

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

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

void f(bool* lol)
{
    bool ** wtf = (bool**)lol;

    std::cout << "EH?: " << wtf[200][135] << std::endl;
    std::cout << "HEH?: " << wtf[134][244] << std::endl;
}

int main()
{
    bool bob[256][256];
    bob[200][135] = false;
    bob[134][244] = true;

    f(&bob[0][0]);
    return 0;
}


Output:
1
Segmentation fault


Create a new paste based on this one


Comments: