Skip to content

Instantly share code, notes, and snippets.

@allen501pc
Created July 6, 2009 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allen501pc/141485 to your computer and use it in GitHub Desktop.
Save allen501pc/141485 to your computer and use it in GitHub Desktop.
/*
* DATE: 07/06/2009
* Usage: Passing two-diemnsion array
* Author: Allen
*/
#include <iostream>
using namespace std;
#define SIZE 10
void func(int arr[][SIZE])
{
for(int row=0;row<SIZE;++row)
{
for(int col=0;col<SIZE;++col)
cout << arr[row][col] << " ";
cout << endl;
}
}
int main(int argc,char * argv[])
{
int array[SIZE][SIZE]={0};
func(array);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment