I am working with a C89 compiler and I am encountering a pointer input error.
Call Code:
struct cpu_state_type cpu_state;
foo()
{
print_out_cpu(&cpu_state);
}
Print_out_cpu is defined elsewhere, and file H is included.
struct cpu_state_type
{
int r[12];
};
void print_out_cpu(struct cpu_state_type *c);
I get an error:
error: incompatible type for argument 1 of 'print_out_cpu'
As far as I understand, &cpu_statetype returns cpu_state_type*, so I'm confused.
source
share