Type size

 

The size of all C++ types can be expressed as integer multiples of the char type. 

The size of the type may be different on different machines and can be obtained using the sizeof operator.

#define debug qDebug()<<
int main(int argc, char *argv[])
{
    debug sizeof(bool);
    debug sizeof(char);
    debug sizeof(int);
    debug sizeof(double);
}

The size of a custom type is related to the number and type of its members:

Guess you like

Origin blog.csdn.net/kenfan1647/article/details/113780547
Recommended