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

Best way to break?

Name: Anonymous 2009-02-01 12:26

my current hierarchy looks like this:

main()
{
for()
{
function();
}
}

function()
{
if
{
break;
}
}

apparently c++ doesn't like it if I have the function try and break the for loop, but i need that function to do so. What would be the proper course of action for this scenario?

Name: Anonymous 2009-02-01 12:56

>>7

main()
{
    for()
    {
        if function() {
            break;
        }
    }
}

function()
{
    if
    {
        return 1;
    }
    return 0;
}

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