My little program compiles, but it prints out giberish?
<p>Okay. . . pointers are driving me bonkers!!! Okay, now that I have that out of my system, the following code compiles, however, it does not print out the correct output. What am I doing wrong?</p>

<pre><code>    #ifndef _TERM_H
    #define _TERM_H

    class Term {

    public:
    //constructors
    Term( Rational &amp;a, const int &amp;b)
    {   
    this-&gt;coefficient = a;
    this-&gt;exponent = b;
    }

    ~Term () {}    

   //coefficient

   Rational getCoefficient()const{
    return coefficient;
   }

   //exponent

   int getExponent()const{
    return exponent;
   }

   //print the Term
   void print()const {

   cout &lt;&lt; &amp;Term::coefficient &lt;&lt; " x^"  &lt;&lt; &amp;Term::exponent &lt;&lt; endl;
   }    

   private:
   Rational coefficient, a; 
   int exponent, b;
   };

   #endif 
</code></pre>

<hr>

<pre><code>   #ifndef _RATIONAL_H
   #define _RATIONAL_H

   class Rational {

   public:
   //constructors
   Rational( const int &amp;a, const int &amp;b){
    if (a != 0)
        if (b != 0)
            this-&gt;numerator = a;
            this-&gt;denominator = b;
   }

   Rational(){}

   ~Rational() {}

      .....

   private:
   int a, b, numerator, denominator;


   };

   #endif
</code></pre>

<p>Okay, so when I input values (2/5) for my Rational number and i input 2 for my exponent (I am supposed to get( 2/5 x ^2)) I get 1 X^1.  Huh? I am running out of hair to pull out. . .</p>
