All pastes #975799 Raw Edit

Someone

public text v1 · immutable
·published 2008-04-07 20:07 UTC
rendered paste body
#include <iostream>
#include <time.h>

using std::cout;
using std::endl;

class Time {
 public:
  Time();
  void printTime();
  void setTime();
 private:
  time_t value;
};

Time::Time()
{
  setTime();
}

void Time::setTime()
{
  value=time(NULL);
}

void Time::printTime()
{
  cout << "Current time is: " << value << endl;
}

int main()
{
  Time t;
  t.printTime();

 return 0;
}