Sobes.tech
Back to tasks
Junior — Senior
127

Размеры пустых типов и их наследование

Task condition

livecode

Какой результат будет выведен программой?

void checkEmptyStructs()
{
    struct EmptyBase {};
    struct EmptyDerived : EmptyBase {};
    std::cout << sizeof(EmptyBase) << " " << sizeof(EmptyDerived);
}