I am working on the os161 project. I create a file which include the array.h provide in src/kern/include. When I compile, I had the error like this: ./../include/array.h:85: error: expected '=', ',', ';', 'asm' or 'attribute' before 'unsigned' ../../include/array.h:91: error: expected '=', ',', ';', 'asm' or 'attribute' before 'void'
the code is like:
#ifndef ARRAYINLINE
#define ARRAYINLINE INLINE
#endif
ARRAYINLINE unsigned --------------line 85 error
array_num(const struct array *a)
{
return a->num;
}
ARRAYINLINE void * --------------line 91 error
array_get(const struct array *a, unsigned index)
{
ARRAYASSERT(index < a->num);
return a->v[index];
}
and this kind of error happened at every line has something like INLINE or ARRAYINLINE. This array.h file is provided and I made no change to it. Really cannot figure out why.