Project Euler: Longest Collatz Sequence
I think that you are writing similar functions to make very similar things. You can take advantage of ternary operator ? and make a simpler function instead:

int Collatz( int &amp;len, int number )
{
    std::cout &lt;&lt; number &lt;&lt; " - ";
    len++;

    if( number == 1 )
        return 1;

    int NextNumber = number % 2 ? number*3+1 : number/2;

    return Collatz( len, NextNumber );
}


int main()
{
    int len = 0;
    Collatz( len, 13);

    std::cout &lt;&lt; "Lenght: " &lt;&lt; len &lt;&lt; std::endl;

    return 0;
}


The output is:

13 - 40 - 20 - 10 - 5 - 16 - 8 - 4 - 2 - 1 - Lenght: 10