خرید بک لینک

Vote count: 0

Will the following work as expected?:

struct A {};

struct B: public A {
    int x;
    };

void f( B* o ) {
    std::cout << o->x << std::endl;
    }

int main () {
    B b;
    b.x = 5;
    reinterpret_cast<void(*)(A*)>(f)( &b );
    }

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 14 خرداد 1395 ساعت: 12:49

صفحه بندی