I recently came across this approach to managing headers. I could not find a lot of information about my problems on the Internet, so I decided to ask here.
Imagine that you have a program in which you have main.c, as well as other sources and headers, for example:person.c, person.h, settings.c, settings.h, maindialog.c, maindialog.h, othersource.c, othersource.h
sometimes main settings.cmay be required .person.cmaindialog.c
Sometimes, some other sources may need to include other source files. This is usually done internally settings.c:
#include "person.h"
#include "maindialog.h"
But I came across an approach that global.halso has an inside of it:
#include "person.h"
#include "maindialog.h"
#include "settings.h"
#include "otherdialog.h"
, "global.h"
, .
global.h ?
user2793162