C++ template class operator for brackets and equal to insert and get element
<p>hello i want to create simple array class to get value and insert value like <code>(array[0] = 4)</code> and this is my program but i have problem to use <code>[] =</code> in same time for insert</p>

<pre><code>template &lt;typename Param&gt;
class arr
{
private:

    int Last_point = 0;
    Param Data[];

public:

    void&amp; operator[]=(int Element_id, Param v)
    {
        Data[Element_id] = v;
    }

    Param&amp; operator[] (int Element_id)
    {
        return Data[Element_id];
    }
};



void main()
{
    arr &lt;int&gt; Array;


    Array[1] = 555;

    cout &lt;&lt; "Is(" &lt;&lt; to_string(Array[1]) &lt;&lt; ")" &lt;&lt; endl;

    system("pause");
}
</code></pre>

<p>is there any operator like ([]=)? or for this, i have to use which methods? also i want to get value if just used <code>[]</code></p>