Is it considered a "bad programming practice" to include a header that had already been included in another header that I included?
Was it difficult to understand the above question? If so, look at the code below:
# tst_1.h
#ifndef TST_1_H
#define TST_1_H
//...código...e mais código...
#endif //TST_1_H
# tst_2
#ifndef TST_2_H
#define TST_2_H
#include "tst_1.h"
//...código...e mais código...
#endif //TST_2_H
# main.c
#include "tst_1.h"
#include "tst_2.h"
int main(void){
//...faz alguma coisa...
return 0;
}
Note that I include tst_1.h
in main.c
and tst_2.h
already included it within its definition.
So, is this a "bad programming practice" in a program written in C?