for ( int i = 0; i < dlina; i++ )
{
if ( ( a[i] == '0' ) || ( a[i] == '1' ) || ( a[i] == '2' ) || ( a[i] == '3' ) || ( a[i] == '4' ) || ( a[i] == '5' ) || ( a[i] == '6' ) || ( a[i] == '7' ) || ( a[i] == '8' ) || ( a[i] == '9' ) || ( a[i] == ',' ) || ( a[i] == '#' ) )
...
}
if ( (( a[i] >= '0' ) && ( a[i] <= '9' )) || ( a[i] == ',' ) || ( a[i] == '#' ) )
string s = "01234567890,#";
if (s.find(a[i]) != string::npos) {