title: Changed value through set function but; value not changing when called
body: <p>I have two classes an "Author" and a "Book" class. The book class constructor uses the Author constructor. The problem that is happening is that when I change a value in the author class using a setter function and then I try using the Book print function to print all the information, the new value is not printed.</p>
  
  <p>I set the default constructor of Author to implement all private value.</p>
  
  <p>//Author class</p>
  
  <pre><code>Author::Author(string name, string email, char gender)
  {
      this-&gt;name = name;
      this-&gt;email = email;
      this-&gt;gender = gender;
  }
  Author::Author()
  {
  }
  
  Author::~Author()
  {
  }
  string Author::getEmail()
  {
      return email;
  }
  
  void Author::setEmail(string email)
  {
      this-&gt;email = email;
  }
  string Author::print()
  {
      return name + " (" + gender + ") @ " + this-&gt;email;
  }
  </code></pre>
  
  <p>//Book class</p>
  
  <pre><code>Book::Book(string name, Author author, double price)
  {
      this-&gt;author = author;
      this-&gt;name = name;
      this-&gt;price = price;
  }
  Book::Book()
  {
  }
  
  Book::~Book()
  {
  }
  Author Book::getAuthor()
  {
      return this-&gt;author;
  }
  string Book::print()
  {
      return name + " by " + this-&gt;author.print(); 
  }
  </code></pre>
  
  <p>//Main class</p>
  
  <pre><code>int main()
  {
      Author author("Jonathan Gonzalez", "g.jonathan.com",'M');
      Book stock("NO BS! THE REALITY OF THE STOCK MARKET", author, 4.99);
      cout &lt;&lt; author.print() &lt;&lt; "\n" &lt;&lt; endl;
      cout &lt;&lt; stock.print() &lt;&lt; "\n" &lt;&lt; endl;
  
      author.setEmail("g.jonathan@gmail.com");
      stock.setPrice(2.99);
      cout &lt;&lt; stock.print() &lt;&lt; "\n" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>When I use the stock.print() function after I have changed a value using the author.setEmail() function it does not print using the new email.</p>
  
  <p>OUTPUT 
  Jonathan Gonzalez (M) @ g.jonathan.com</p>
  
  <p>NO BS! THE REALITY OF THE STOCK MARKET by Jonathan Gonzalez (M) @ g.jonathan.com</p>
  
  <p>NO BS! THE REALITY OF THE STOCK MARKET by Jonathan Gonzalez (M) @ g.jonathan.com</p>
  
  <p>//
  //Expected OUTPUT</p>
  
  <p>Jonathan Gonzalez (M) @ g.jonathan.com</p>
  
  <p>NO BS! THE REALITY OF THE STOCK MARKET by Jonathan Gonzalez (M) @ g.jonathan.com</p>
  
  <p>NO BS! THE REALITY OF THE STOCK MARKET by Jonathan Gonzalez (M) @ g.jonathan@gmail.com</p>