Hi,
I am having problems with generating a simple recursive function bool intTest(int n, char c) that will determine if a digit is (return 1) or isn't (return 0) part of a number.
The code I came up with works fine if the data type of the digit c is int, but not if type char is used; in every case, the functions returns 1.
Are there any obvious conversion techniques I am missing?(for '1' to 1 I used c-'0')
Also, is there a problem with cin>>c ?!