So I have a main file and a bunch of other dependent files with their own header files. So while building it throws an error that a object which is created using another file(structure.cpp) and to make things within scope i used another header file extra.hpp with
extern std::vector <Vert *> verts;
extern Vert *new_vertex;
But it throws an error that extern Verts is out of scope. And if I add underscores to the structure header fileit solves the problem but removing underscores in the #ifndef throws out of scope problem. How?
#ifndef __STRUCTURES_HPP__
#define __STRUCTURES_HPP__
#include <iostream>
#include <vector>
void genSheet(unsigned int , unsigned int , double bondLength);
#endif
I tried mentioning all header files everywhere which created a mess. Also how to manage including files when you have so many extra files which is not main file.