?
=?ISO-8859-1?Q?Florian_B=FCrzle?=
Hi! I've organized my code in different files - the declarations of
global variables and methods are contained in a file global.hh (for
compilation via makefile under Linux). In this file I included the
following:
extern const int dim; //dimension of the array
class Particle{
public:
double x[dim]; //particle position
};
Since dim is defined in another file (where main() is located), the code
does not compile. Does anyone have an idea how this could be fixed? I've
consulted several books, but this doesn't seem to be a common problem
(or I have the wrong books).
Thanks in advance for any advice!
Florian
global variables and methods are contained in a file global.hh (for
compilation via makefile under Linux). In this file I included the
following:
extern const int dim; //dimension of the array
class Particle{
public:
double x[dim]; //particle position
};
Since dim is defined in another file (where main() is located), the code
does not compile. Does anyone have an idea how this could be fixed? I've
consulted several books, but this doesn't seem to be a common problem
(or I have the wrong books).
Thanks in advance for any advice!
Florian