for ( int i = 0; i < rollsize; i++ )
{
        allresults[ roll[i] -3 ]++;
}

ps - don't be afraid to use a little whitespace between operators and operands. makes for easier reading.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.