Maybe if you explain what you want, we can offer different solutions?
There's things like memory allocation for dynamic arrays...
mresult[0] = pos[0] + t*dir[0];
mresult is a double pointer, first in typedef and then in the arguments, while pos is only in the typedef. You can't make that conversion.
(mresult[0])[0] will probably work