switch case inside loop
<p>I've run into a slight problem with my function. When I typed in 8 I want it to quit. However when I type 8, it prints out my default message then quits. What have I missed?</p>

<pre><code>void Selection()
{
    int selection;

    while (selection != 8)
    {
        printMenu();
        scanf("%d", &amp;selection);
        switch (selection)
        {
            case '1': /*FUNCTION HERE*/ ; break;
            case '2': /*FUNCTION HERE*/ ; break;
            case '3': /*FUNCTION HERE*/ ; break;
            case '4': /*FUNCTION HERE*/ ; break;
            case '5': /*FUNCTION HERE*/ ; break;
            case '6': /*FUNCTION HERE*/ ; break;
            case '7': /*FUNCTION HERE*/ ; break;
            case '8': break;
            default: printf("Unkown command please try again.\n"); break;
        }
    }
}
</code></pre>