How do you call a function in a function?
This is the function:
comments and statements will be two other functions both returning int values.Code:int comStaRatio(int comments, int statements)
{
int ratio=1;
ratio=comments/statements;
return(ratio);
}
So when called I will do:
but this doesn't work. Why?Code:printf("Comment to statement ratio: %d\n", comStaRatio(comCount(file_pointer), staCount(file_pointer)));
Thanks.
