youssef-saaed / BooleanArray

A C++ class for storing boolean values efficiently using a single bit instead of byte per value

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BooleanArray

A C++ class for storing boolean values efficiently using a single bit per value.

Usage

Include the BooleanArray.h header file in your C++ project and use the BooleanArray class as follows:

#include "BooleanArray.h"

// Example Usage
int main() {
    // Create a BooleanArray with a specified size
    BooleanArray boolArray(100);

    // Set and get values
    boolArray.set(5, true);
    bool value = boolArray[5];
    
    return 0;
}

About

A C++ class for storing boolean values efficiently using a single bit instead of byte per value

License:MIT License


Languages

Language:C++ 100.0%