Can't figure out a line of code

Hi,
I have the following line of code in Primes.cpp file.

std::vector<BigNatural> PrimeNumbers::primeNumbers_;

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.

---------------------------------------------
namespace QuantLib {

//! 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_;
};

}

----------------------------------------


It is instantiating the static data member of the class.
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.
Thanks,

Got it.
Topic archived. No new replies allowed.