View Single Post
Old 10-14-2004, 03:44 PM   #32 (permalink)
gamehead200
Code Monkey
 
gamehead200's Avatar
 
Join Date: Oct 2004
Posts: 57
gamehead200 is an unknown quantity at this point
Because I'm nice and its due tomorrow, here's part of my code:

Code:
while( i < sent.size() )
    {
        switch( sent[i] )
        {
            case 'a':
            acount++;
            break;
        }    
         
        i++;
    }
And to only show the letters that actually appear more than 0 times:

Code:
    if( acount )
        cout << "a = " << acount << endl;
gamehead200 is offline   Reply With Quote