Hi, I've got a static variable within a .h file and it seems to be initialised fine, but when i try to adjust it its coming out with a -1.#IND runtime error.
The static variable in question is the sumPhotons variable.
the relevant lines in the .cpp file that call the class are:
private:
double lEnergy[128];
double lTemp[128];
double percentagePhotons[128];
static const int totalPhotons;
static double sumPhotons;
static const double kT=0.00023481;
double numPhotons;
static const double constant;//this constant is the 1/(hbar^3*pi^2*c^3). C didnt like the size of it in the numphotons line though so I've adjusted for it later
Also, if anyone has some insight, the percentage values im getting are about 2% less than they should be? That would be a serious help but then it wouldn't be a purely programming error so its not really what the forum is here for i suppose!