Hi everyone, i'm trying to resolve an C exercise where i have to convert number into an intenger, and i'm trying to use a formula that i had found in internet, it's simple math but for some reason i keep having this same error: solution.c:10:27: error: subscripted value is not an array, pointer, or vector binaryValue += ( value[i] * ( 10 length ); ~~~~~^~ solution.c:10:39: error: indirection requires pointer operand ('unsigned int' invalid) binaryValue += ( value[i] * ( 10 length ); This is the actual full code of function: size_t countBits(unsigned value) { unsigned int length = sizeof(value) - 1; unsigned int binaryValue = 0; /* Convert number into intenger */ for ( unsigned int i = 0; i <= length; ++i ) binaryValue += ( value[i] * ( 10 length ); return binaryValue; } I'm just trying to multiply the first number in the int for the ( 10 length ) using the iteration number as index, someone knows how to resolve it?