SO I am humming right a long in my Learning C book and then my brain freezes on Chapter 9 Error handling. This line of code stopped me in my tracks, it's only part of the over all code.
Now my brain is telling me that printf is the argument that is begin passed to error. But error is of type int and it is begin passed a char string? When I run this it is printing the printf line but also storing some int value in error to be evaluated by IF? Huh?
-Lars
Code:
int error;
error = printf( "The title array takes up %ld bytes of memory.\n\n", sizeof( title ) );
if ( error < 0 )
return kError_printf;
Now my brain is telling me that printf is the argument that is begin passed to error. But error is of type int and it is begin passed a char string? When I run this it is printing the printf line but also storing some int value in error to be evaluated by IF? Huh?
-Lars