#include <iostream>

using namespace std;

class t0
{
  private: 
    float time;

  public: 
   t0() {;} 
   ~t0() {;}

    void set_time(float in) {time = in;}
    float& get_time() {return time;}
    void print() {cout<<time<<endl;}
};

class test
{
  private: 
    int year;
    int* people;

  private: 
    t0 time;

  public: 
   test(); 
   ~test();

    void set_year(int in) {year = in;}
    void set_people(int in, int Id) {people[in] = Id;}

    int& get_year() {return year;}
    int& get_people(int i) { return people[i];}

    const t0& t() const {return time;}

    void set_all();
    void print();
};



//........................
test::test() 
{
     cout<<" I'm doing test"<<endl;
     people = new int[100];
     time.set_time(8.0);
}

//......................
test::~test() 
{
  delete people;
}

//.........................
void test::print()
{
   for(int i = 0; i<100; i++) {
     cout<<"people: "<<i<<" "<<people[i]<<endl;
   }
}

//.........................
void test::set_all()
{
   for(int i = 0; i<100; i++) {
     people[i] = 100-i;
   }
}


void tttt(test* a, int* year)
{
  int yr = (*year);

  a->set_year(yr);
  a->set_all();

}
int main()
{
  test* a = new test;

  test b;
  
  int yr = 2010;
  tttt(a, &yr);

  cout<<"year: "<<a->get_year()<<" b-year = "<<b.get_year()<<endl;

  b = *a;
  cout<<"again B year = "<<b.get_year()<<endl;
  for(int i = 0; i<10; i++) {
    int people = a->get_people(i);
  cout<<"people: "<<people<<endl;
  }

  t0 tt = a->t();
  tt.print();

  return 0;
}
