#include <stdio.h>
#include <stdlib.h>
int main()
{
unsigned x = 10;
getbits(x, 4, 3);
return 0;
}
unsigned getbits(unsigned x, int p, int n)
{
return (x >> (p+1-n) & ~(~0 << n));
}
F:\Cpractice\test\main.c||In function 'main':|
F:\Cpractice\test\main.c|7|warning: implicit declaration of function 'getbits'|
F:\Cpractice\test\main.c|11|error: conflicting types for 'getbits'|
F:\Cpractice\test\main.c|7|note: previous implicit declaration of 'getbits' was here|
||=== Build finished: 1 errors, 1 warnings ===|
哪错了?