Author Topic: How can I send a matrix into a function?  (Read 3092 times)

oligaz

  • Guest
How can I send a matrix into a function?
« on: July 28, 2009, 10:29:23 am »
void xxx(int A[10][10])
{
  ...
}


or

void xxx(int (*A)[10])
{
  ...
}

int main()
{
  int A[10][10];
  xxx(A);
  return 0;
}


This code does not work!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: How can I send a matrix into a function?
« Reply #1 on: July 28, 2009, 10:34:34 am »
And this is not a learning C/C++ forum.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."