A friend of mine sent me this code snippet to celebrate his new baby birth:
void new_baby_name() { father_surname++; }
The snippet is from his point of view, he is the father and the new baby get the surname from him.
I answered with this:
class father_name {};
class mother_name {};
class new_baby_name: public father_name, public mother_name {};
But I'm not fully satisfied of my answer...
The correct reply is:
Sleep(0);
class baby
{
public:
vector<gene> genes;
baby(baby* logical_father, baby* biological_mother, baby* other)
{
int i;
if (other == null)
{
for (i = 0; i < logical_father->genes.size())
{
if (rand() > 0.5)
{
genes.push_back(logical_father->genes[i]);
}
else
{
genes.push_back(biological_mother->genes[i]);
}
}
}
else
{
for (i = 0; i < other->genes.size())
{
if (rand() > 0.5)
{
genes.push_back(other->genes[i]);
}
else
{
genes.push_back(biological_mother->genes[i]);
}
}
}
}
}
There are, of course, other methods for constructing a baby.
destroy Sanity();
May not run, may stack overflow. I am not good at c.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With