// smallProg.cc
// P. Conrad for CISC181 11/02
// demo program to demo Makefiles... it will use a struct defn
// from myStruct.h and some functions from myFuncs.cc

#include "myStruct.h"

#include <iostream>
using namespace std;

#include <cstring>

int main(void)
{

  cout << "Here " "is "  "an " "odd " "little "
          "known " "fact " "about " "C++\n";
  
  MyStruct_S s;

  strncpy(s.name,"Conrad",NAME_LEN);
  s.age = 41;

  cout << "This one passes by const reference" << endl;
  printMyStruct(s);


  cout << "This one passes by value" << endl;
  printMyStructAgain(s);

  cout << "This one passes by value and tries to increment" << endl;
  tryToIncrementMyAge(s);

  cout << "This one passes by value "
          "(after trying to increment passing by value" << endl;
  printMyStructAgain(s);

  cout << "This one passes by reference and tries to increment" << endl;
  incrementMyAge(s);

  cout << "This one passes by value \n"
          "   (after trying to increment passing by reference" << endl;
  printMyStructAgain(s);


  return 0;

}

