Devolver matriz bidimensional

Antonio
03 de Abril del 2004
Necesito escribir una función que devuelva una matriz bidimensional.
¿Alguien me podría ayudar?
Gracias

noel solw
03 de Abril del 2004
// program a9_221.cpp - page 221.
// exercices to the top - ziv ayalon - 2000
// written in borland c++ - ver 3.1

#include <conio.h>
#include <iostream.h>
#include <iomanip.h>

#define COLUMNS 4

void GetArray(int a[][COLUMNS],int rows)
{
for(int i = 0;i < rows;i++)
for(int j = 0;j < COLUMNS;j++)
{
cout << "a[" << i << "][" << j << "] = ";
cin >> a[i][j];
}
cout << endl;
} // GET ARRAY

void ShowMatrix(int a[][COLUMNS],int rows)
{
for(int i = 0;i < rows;i++)
{
for(int j = 0;j < COLUMNS;j++)
cout << setw(7) << a[i][j];
cout << endl;
}
} // SHOW MATRIX

void main()
{
int a[2][COLUMNS];
GetArray(a,2);
ShowMatrix(a,2);
cout << endl;
int b[5][COLUMNS];
GetArray(b,5);
ShowMatrix(b,5);
} // MAIN

*/