Selasa, 04 Oktober 2016

How to work with bit Field classes in C++

Bit Fields in Classes   A field or member inside a class which allows programmers to save memory are known as bit fields. As we know a integer variable occupies 32 bits (on a 32-bit machine). If we only want to store two values like 0 and 1, only one bit is sufficient. Remaining 31-bits are wasted. In order to reduce such wastage of memory, we can use bit fields. Syntax of a bit field is as follows: type-specifier declarator: width;   In the above syntax declarator is an identifier (bit-field name), type-specifier is the data type of the declarator and width is the size of

The post How to work with bit Field classes in C++ appeared first on Coding Security.


How to work with bit Field classes in C++
read more

Tidak ada komentar:

Posting Komentar