Hi.
Is this code correct?
is in spanish but not to worry!!!
long memoria::swaplibre()
{
long cantidad=0;
long NroPaginas;
NroPaginas = ((MAX_MEM/5)/1024);
long contador=0;
long multiplicador=1;
while (contador<=NroPaginas)
{
//Is this correct? the array is declared
//as follows: char swap[MAX_MEM]
char *textoswap;
textoswap=swap[contador] + "";//HERE!!!!!
if (strcmp(textoswap, "/O"
==0)//HERE!!!
{
cantidad++;
}
contador = multiplicador*5*1024;
}
return(cantidad);
};
Thanks
Juan Velasquez
correo@runbox.com
Is this code correct?
is in spanish but not to worry!!!
long memoria::swaplibre()
{
long cantidad=0;
long NroPaginas;
NroPaginas = ((MAX_MEM/5)/1024);
long contador=0;
long multiplicador=1;
while (contador<=NroPaginas)
{
//Is this correct? the array is declared
//as follows: char swap[MAX_MEM]
char *textoswap;
textoswap=swap[contador] + "";//HERE!!!!!
if (strcmp(textoswap, "/O"
{
cantidad++;
}
contador = multiplicador*5*1024;
}
return(cantidad);
};
Thanks
Juan Velasquez
correo@runbox.com