This is what I have been thinking:
class lessthan10
{
public:
int a;
lessthan10() {cout<<"Bad data"; //etc.}
};

Now in the original function, if it had been:
void myfunc(int a, string b);

How would the user call it:
myfunc(1000, string b);

This would not work. Wouldn't the user need to define an object first, etc.

Thanks