dimanche 23 août 2015

Not all control paths return value

Why does Visual Studio shows me that error with following code:

    int func( int a )
{
    if ( a < 0 )
        return -a & 3;
    else if ( a > 0 )
        return a | 8;
    else if ( a == 0 )
        return 10;
}

Aucun commentaire:

Enregistrer un commentaire