This is my code:
Code:
char get_bits_squeeze(char num, char mask)
{
num = print32bits(num);
mask = print32bits(mask);
char activeBits;
for (int i=0;i<32;i++)
{ if (mask[i]=='1')
strcat(activeBits,num[i]);
}
return activeBits;
}
(num and mask represent 32-char long bit sequences)
I compile via gcc and I get this error:
Code:
error: subscripted value is neither array nor pointer
error: subscripted value is neither array nor pointer
referring to mask[i] and num[i], so how do I access the individual char at a given point?