Change the age of the automatically every year
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/13444390/how-to-change-the-age-automatically-every-year">How to change the age automatically every year</a>  </p>
</blockquote>



<p>I wrote this program, but I have a variable "age".  How do I make it so that I do not have to change age of the dogs every year?  In other words it should change automatically?</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;conio.h&gt;
#include &lt;string&gt;
#include &lt;stdlib.h&gt;

using namespace std;

class Dog//instance class
{
string Fam;
string &amp; Name;
//string  Name;
string Otch;
static string mField;
unsigned int    Nagradi;
unsigned int    Age;
public:

Dog(string fam="", string otch="", string nam="", 
unsigned nagradi=0, unsigned age=0):Fam("")
    ,Name(Fam)
{
    cout &lt;&lt; "Dog::Dog(" &lt;&lt; nam &lt;&lt; ")" &lt;&lt; endl;
    Name = nam;
    Otch = otch;
    Fam  = fam;
    Nagradi = nagradi;
    Age = age;
}

Dog(Dog const &amp; st): Name(Fam)//constructor
{
    cout &lt;&lt; "Dog::Dog(copy:" &lt;&lt; st.Name &lt;&lt; ")" &lt;&lt; endl;
    Name = st.Fam;
    Otch = st.Name;
    Fam  = st.Otch;
    Nagradi = st.Nagradi;
    Age = st.Age;
}

~Dog()//Destructor
{
    cout &lt;&lt; "Dog::~Dog(" &lt;&lt; Name &lt;&lt; ")" &lt;&lt; endl;
     system ("pause");
      }

void Show()
{
    cout&lt;&lt; Name &lt;&lt; ' ' &lt;&lt; Fam &lt;&lt; ' ' &lt;&lt; Otch &lt;&lt;
           " #" &lt;&lt; Nagradi &lt;&lt; " age:" &lt;&lt; Age &lt;&lt; endl;
}
};
</code></pre>
