// Compile with: g++ 327.cc ../chapter5/162/student_constr.cpp
//
//
#include <iostream>
#include "../chapter5/162/student_constr.h"
using namespace std;

void bla(const Student& s)
{
   cout << "Body of the bla function" << endl;
}

Student& blaS(Student& s)
// Student& blaS(Student s)  // CAREFUL: don't do this!
{
   cout << "Body of the blaS function" << endl;
   return s;
}

int main()
{
   Student s("First Last");
// Student & rs = s;    // Just to remind you about
                        // the behavior of references
   cout << "This is the first output of the main function " << endl;
   int year, no;

   s.set_no(100);
   s.set_year_of_studies(1);

   year = s.get_year_of_studies();
   no = s.get_no();
   cout << "\nYear of studies is " << year
        << " for student with no " << no
        << " and name " << s.get_name() << endl;

   Student scopied(s);

   bla(s);
   blaS(s);
   scopied = blaS(s);

   cout << "Just exiting the main function ...." << endl;

   return 0;
}
