I was making a sample program (which isn't in front of me right now), and I was making a header with everything for me to use. I know the header itself works because I use it to write all of my for loops, however on this code:
1 2 3 4 5 6 7 8
int numOfDigits(number)
{
int d=1;
while(number>=10)
{d++;
number/=10;}
return d;
}
whenever I call it, the compiler complains that it's out of scope. What's the problem with it?
EDIT: I forgot to declare "number" as an int. Forget I even spoke.