I have written following sample code to demonstrate my problem
#include
#include
using namespace std;
void f (char*** a)
{
It's because of the operator precedence, where the array-indexing operator [] have higher precedence than the dereference operator *.
So the expression *a[0] is really, from the compilers point of view, the same as *(a[0]), which is not what you want.
You have to explicitly add parentheses to change the precedence:
(*a)[0] = ...