B
broli
In my project it is getting really messy to take care of all the
headers..for eg. right now I have following modules in my project -
vector.c
vector.h
test.c
reader.h
reader.c
vector.h
#ifndef VECTOR_H
#define VECTOR_H
#include <math.h>
.....
......
vector.c
#include "vector.h"
........................
reader.h
#ifndef READER_H
#define READER_H
#include <stdio.h>
#include <stdlib.h>
..........................
...........................
And then, I have test.c which needs reader.h, vector.h. But there can
be instances where I may need to include stdio.h and stdlib.h but not
other contents of reader.h. also, it is getting extremely confusing
to manage all the files. So is it a good idea to have a single all.h
file ? My code must be around 7000 lines.
headers..for eg. right now I have following modules in my project -
vector.c
vector.h
test.c
reader.h
reader.c
vector.h
#ifndef VECTOR_H
#define VECTOR_H
#include <math.h>
.....
......
vector.c
#include "vector.h"
........................
reader.h
#ifndef READER_H
#define READER_H
#include <stdio.h>
#include <stdlib.h>
..........................
...........................
And then, I have test.c which needs reader.h, vector.h. But there can
be instances where I may need to include stdio.h and stdlib.h but not
other contents of reader.h. also, it is getting extremely confusing
to manage all the files. So is it a good idea to have a single all.h
file ? My code must be around 7000 lines.