I am looking for a function that returns what a value is...if it's a digit or a char.
Basically, here's what I'm trying to do:
// class outline
public: mb( int i );
mb( char c );
private: int num;
Basically, I will create a new mb and assign a value. For ex in main:
mb *p1 = new mb(23);
mb *p2 = new mb('x');
// now when retrieving value to use somewhere else, i will use
// the bool ftn to tell me wether it's an int or not.
bool b = p2 -> isNum();
but, isdigit doesn't work for this. at least when i tried it with a very simple test program it didn't work.
any help would be greatly appreciated