codice:
#include <string>
#include <iostream>

using namespace std;

int main()
{
string buf;
int a_count = 0;
int b count = 0;
char* lettere[] = { "a", "b"};
for( int i=0; i< buf.length(); i++ )
{
	for( int j=0; j < 2; j ++ )
	{
		swhitc( buf.find(lettere[j]) )
		{
			case "a":
				a_count++;
			case "b":
				b_count++;
			default:
				cerr << "Lettere non valida\n";
		
		}
	}
}
return 0;
}