title: Using a Random class in a static way
body: <p>I am making a simple <code>Random</code> class:</p>
  
  <pre><code>class Random
  {
  public:
      static bool seeded = false;
  
      static void SeedRandom( int number )
      {
          srand(number);
      }
      static int GetRandom(int low, int high)
      {
          if ( !seeded )
          {
              srand ((int)time(NULL));
          }
          return (rand() % (high - low)) + low;
      }
  };
  </code></pre>
  
  <p>Obviously C++ doesn't allow a whole class to be declared as <code>static</code> (which is what makes this so easy in C#). I've instead made all the members as <code>static</code>. There is also no <code>static</code> constructor so I have no way to initialize my <code>bool seeded</code> unless I call a function by hand, which defeats the purpose. I can instead use a regular constructor in which I would have to create an instance of <code>Random</code>, which I don't want to do.</p>
  
  <p>Also, does anyone know if the new C++0x standard will allow static classes and/or static constructors?</p>