What the advantage of forward declaration?
For example:
In header_file.h
typedef struct foo * fooPtr;
In implement_file.c
[code tags added by ygfperson]Code:struct foo { int x; int y; }
What the advantage of forward declaration?
For example:
In header_file.h
typedef struct foo * fooPtr;
In implement_file.c
[code tags added by ygfperson]Code:struct foo { int x; int y; }
it helps with type checking most of the time. it's unlikely you'll make the same mistake twice in one program.