// naiveDriver.cc  P. Conrad CISC181 Spring 2006
// a simple driver program that illustrates
// that direct access to private data members is proihibited.

#include <iostream>
using std::cout;
using std::endl;

#include "complex.h" // this means pull in the definition of Complex_C
               
// so now, I can declare variables of type Complex_C


int main(void)
{
  Complex_C c; 

  cout << "c = ";
  c.print(); // calls the "print() member function" on object called "c"
  cout << endl;

  // A Naive attempt to set the real part

  c.a = 4.0; // this won't compile

  cout << "Now c = ";
  c.print();
  cout << endl;

  // A naive attempt to print the real and imag parts

  cout << "c.a = " << c.a << endl;
  cout << "c.b = " << c.b << endl;

  cout << endl;

  // Here's something else we can't do:
  //  we can't do this--at least not until
  // we've covered operator overloading in Chapter 8

  cout << "c= ";
  cout << c ;
  cout <<  endl;


  return 0;
}
