Returning const reference from function
<p>I want my function to return an array of objects. But i want some restriction on returned reference so that returned value/reference is not modified by caller.</p>

<p>Eg
<code></p>

<pre>class A
{
    B **arrB;

    public :
        A() 
        {
            initialize arrB 
        }
        B** getB()
        {
           return arrB;
        }
}
</code></pre>

<p>In above code, array returned by getB() function, should not be modified.
Can someone suggest best way to do this ?
Can "const" help?</p>
