The function should be declared like
void nahraj(TQUEUE *tmp, size_t i, int value )
{
tmp[i]->m_Len = value;
}
and called like
nahraj( tmp, 5, 7 );
There is no sense to pass the pointer tmp
by reference to the function (through a pointer to the pointer tmp
) because the original pointer is not changed within the function.
As for your function definition then at least you need to write within the function
( *tmp )[5]->m_Len = 7;
Otherwise the function will invoke undefined behavior because this expression tmp[5]
within the function means that the pointer tmp
points to an array of pointers to objects of the type TQUEUE
. But this is not true.