I am trying to figure out what it is trying to do. It seem like it is making the primeNumbers_ private member variable a public variable. Is that the case? If that is so, why didn't make it a public variable in the first place.
Thanks a lot
*****
Here is the header file code for Primes.hpp.
//! Prime numbers calculator
/*! Taken from "Monte Carlo Methods in Finance", by Peter Jäckel
*/
class PrimeNumbers {
public:
//! Get and store one after another.
static BigNatural get(Size absoluteIndex);
private:
PrimeNumbers() {}
static BigNatural nextPrimeNumber();
static std::vector<BigNatural> primeNumbers_;
};
Static members, including variables, need to be both declared and defined. That line is the definition of PrimeNumbers::primeNumbers_. Basically, it's just a call to the constructor.