Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.31 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. For pass to function is it worth packing the matrix and its dimension in a struct or is it OK to use additional parameters?
  2. void printMatrix(float **matrix, int rows, int cols);
  3.        
  4. struct Matrix {
  5.   int rows, cols;
  6.   int **data;
  7. };
  8.        
  9. void printMatrix(struct Matrix *m);
  10.        
  11. void printMatrix(struct Matrix m);