Statická matice jako parametr funkce

void function_with_reference_parameter(int (&matrix)[8][8])
{
  /*
    some code
  */
}
 
void function_with_pointer_parameter(int (*matrix)[8][8])
{
  /*
    some code
  */
}
 
int main(int argc, char** argv) {
 
  int matrix[8][8];
 
  function_with_reference_parameter(matrix);
  function_with_pointer_parameter(&matrix);
 
}
programming/c-cpp/staticmatrixfunctionparameter.txt · Last modified: 2018-06-21 19:48 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0