[ create a new paste ] login | about

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

C++, pasted on Feb 14:
#include <iostream>

class ClassA {

    ClassA() {}
    ~ClassA() {}

    int foo1();
    int foo2(void*);

};

int ClassA::foo2(void* data) {
        return 0;
}

int foo2(void* data) {
        return 0;
}

int foo3(int(*)(void*), void*) {
        return 0;
}

int ClassA::foo1() {
    int err;
    err=foo3(::foo2,NULL);
    return err;
}

int main()
{
        std::cout << foo1() << std::endl;
        return 0;
}


Output:
1
2
3
In function 'int main()':
Line 33: error: 'foo1' was not declared in this scope
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: