//  File: des6.C
//
//  The dangers of destructors, part 6

#include <stdio.h>
#include <stdlib.h>
#include "record2.h"


void foo(Record T) {
   Record R("R") ;  // another way to call alternate constructor

   printf("\nIdentify T: ") ;
   T.id() ;

   printf("\nIdentify R: ") ;
   R.id() ;
}


main() {
   Record S("S") ;  // another way to call alternate constructor

   printf("Identify S: ") ;
   S.id() ;

   printf("Calling foo\n") ; 
   foo(S) ;
   printf("Returned from foo\n") ; 

   printf("\n\nEnd of main()\n\n") ;
}
