A static array implementation in C++ I'm implementing a basic array data structure with basic functionalities. 

#include &lt;iostream&gt;
#include "barray.h"

BArray::BArray(int init_size)
{
    b_array = new int[init_size]();
    array_size = init_size;
}

BArray::BArray(int init_size, int init_val)
{
    b_array = new int[init_size];
    array_size = init_size;

    for(int i = 0; i &lt; init_size; ++i)
        b_array[i] = init_val;
}

BArray::BArray(const BArray &amp; rhs)
{
    array_size = rhs.array_size;
    b_array = new int[array_size];

    for(int i = 0; i &lt; array_size; ++i)
        b_array[i] = rhs[i];
}

BArray::~BArray()
{
    delete [] b_array;
}

int BArray::getSize() const
{
    return array_size;
}

int BArray::operator[](int index) const
{
    return *(b_array + index);
}

int&amp; BArray::operator[](int index)
{
    return *(b_array + index);
}

BArray&amp; BArray::operator=(const BArray&amp; rhs)
{
    if(this == &amp;rhs)
        return *this;

    array_size = rhs.array_size;

    delete [] b_array;

    b_array = new int[array_size];

    for(int i = 0; i &lt; array_size; ++i)
        b_array[i] = rhs[i];

    return *this;
}

std::ostream&amp; operator&lt;&lt; (std::ostream&amp; out, const BArray&amp; arr)
{
    for(int i = 0; i &lt; arr.array_size; ++i)
        out &lt;&lt; arr[i] &lt;&lt; " ";

    return out;
}


And the header file

#ifndef BARRAY_H
#define BARRAY_H

class BArray
{
public:
    BArray() = delete;                    //Declare the default constructor as deleted to avoid
                                          //declaring an array without specifying its size.
    BArray(const int init_size);
    BArray(int init_size, int init_val);  //Constructor that initializes the array with init_val.
    BArray(const BArray &amp; rhs);           //Copy constructor.
    ~BArray();                            //Destructor.


    int operator[](int index) const;      //[] operator overloading for "reading" index value.
    int&amp; operator[](int index);           //[] operator overloading for "setting" index value.
    BArray&amp; operator=(const BArray&amp; rhs); //Copy assignment operator.

    //Utility functions.
    int getSize() const;

    //Friend functions.
    friend std::ostream&amp; operator&lt;&lt; (std::ostream&amp; out, const BArray&amp; arr);

private:
    int* b_array;
    int array_size;
};



#endif // BARRAY_H


Can you please give me a feedback on what is missing, what is wrong and what is good? 
I mean in terms of memory allocation, operators overloading, etc...

Is this is the best way this class can be implemented?

Edit:
This is how I tested the code

#include &lt;iostream&gt;

#include "barray.h"

int main()
{

    //BArray invalid_instance; //Default constructor is deleted.

    BArray barr(5); //Declaring an array of size 5, this initializes all values to zeros.

    std::cout &lt;&lt; barr[2] &lt;&lt; std::endl;

    barr[2] = 15;   //Setting index 2 to 15.

    std::cout &lt;&lt; barr[2] &lt;&lt; std::endl; //Reading out value of index 2.

    BArray anotherArray(barr); //Copy constructor.

    std::cout &lt;&lt; anotherArray[2] &lt;&lt; std::endl;

    anotherArray[3] = 8;

    BArray assignArray = anotherArray; //Copy assignment operator.

    std::cout &lt;&lt; assignArray[2] &lt;&lt; std::endl;

    std::cout &lt;&lt; assignArray; //Printing out array values.

    return 0;
}
I would allow the default constructor and make it default to a 0 size array. with the optimization that b_array is a nullptr.

Then you can also add move constructors/assignment. Where the moved-from object gets a b_array = nullptr;

On of the basic functionalities of a container is iteration. So you should add a begin() and end() that return the b_array and b_array+array_size resp. Don't forget the const versions.