Hello,

I am trying to run the code below in order to better understand assigning index to a currency name:

function main()
{
#define MAXCURRENCIES 32
var CStren[MAXCURRENCIES],CStrenSum[MAXCURRENCIES];
int CNum[MAXCURRENCIES];
char CNames[128];
int NumCurrencies = 0;

int ccyIdx(char* name)
{
char Ccy[4];
memcpy(Ccy,name,4);
Ccy[3] = 0;

for(int n=0; n<MAXCURRENCIES; n++)
{
if(!CNames[n*4])
{ // not yet stored
strcpy(CNames+n*4,Ccy);
NumCurrencies++;
return n;
}
if(strstr(CNames+n*4,Ccy))
return n;
}

return 0;
}

}

I am receiving the following error:

Error in 'line 14:
'name' undeclared identifier
memcpy(Ccy,name,4);

I kindly ask for some clarification