Código fuente de matriz
Las funciones sobrecargadas se refieren a funciones con diferentes tipos de parámetros o números pero el mismo nombre de función.
//Sobrecarga de int array
int maxOfArray(int ca[], int num)
{
int nmax = 0;
for(int I = 1; i & ltnumi++)
{
if(ca[I]& gt;ca[nmax]) p >
nmax = I;
}
Return ca[nmax];
}
//Lo siguiente debe ser Se agregó el archivo de encabezado #include "string.h".
string maxOfArray(string ca[], int num)
{
int nmax = 0;
for(int I = 1;i<numi++)
{
if(strcmp(ca[I]>ca[nmax])>0)
nmax = I;
}
Devolver ca[nmax];
}