This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pass 2 dimensional array in function

Does it possible to pass a 2 dimensional array to a funciton? does it accepts?

Parents
  • I'm not going to go trawling through the reference books on this (I'll leave that to others who aren't so busy, or have to for an assignment), but I think you can pass an array by value. Even multi-dimensional ones.

    If you cannot do it directly, then you can enclose it in a structure and pass the structure by value.

    As to why??? Maybe someone can see a reason, but it sure sounds like something to be treated with caution to me.

Reply
  • I'm not going to go trawling through the reference books on this (I'll leave that to others who aren't so busy, or have to for an assignment), but I think you can pass an array by value. Even multi-dimensional ones.

    If you cannot do it directly, then you can enclose it in a structure and pass the structure by value.

    As to why??? Maybe someone can see a reason, but it sure sounds like something to be treated with caution to me.

Children