Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Code from others

Name: Anonymous 2010-10-01 12:09

We all read a lot of code. Post some lines that lets you always facepalm. Example:


bool some_funtion(...)
{
    ...
    ...

    if ( other_func() && something_else )
        return true;
    else
        return false;
}

Name: Anonymous 2010-10-01 19:05

>>5
I was in a situation like this a night or two ago.  Assuming two arrays, both of size n, and consistent modification between the two, I had to decide whether I wanted to iterate for each array individually (same algorithm, put into a separate function) or combining access to both arrays in the the same loop.  I wasn't sure if there was even a difference.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List