I am programming with abstraction of the data types. This means in my header files I declare my struct pointers and their related functions like so:
application.h
typedef struct APPLICATION_Context *APPLICATION_Context;
extern APPLICATION_Context appContextConstruct;
extern void appContextAddMember(int member);
and in the source file:
application.c
#include "application.h"
struct APPLICATION_Context{
int member0;
int member1;
int member2;
};
extern APPLICATION_Context appContextConstruct;
Two questions from this set-up:
Why, in the header, do I not have to declare the typedef'd struct as extern? It should also be visible outside the header!
Do I need to repeat the 'extern' keyword in the source file?