it does not produce an output but when I do the following:
1 2
int num=22*222;
if(is_from_subset(num)) cout<<"22*222";
Output:
4884
which is correct output.
I do not understand why when the argument of the function is_from_subset() is integer the output is correct, but when the argument of the function is any expression there is no output???
Please, can anyone explain me my mistake???
int num=22*222;
if(is_from_subset(num)) cout<<"22*222";
Erm, this won't output 4884, it will output 22*222 which signals you aren't showing us something.
In your main function, you assign integer i to 0 twice which is pointless. You also use a while statement where a for statement would be much more appropriate. The integer N is also input into a file with junk. Your subset function also uses return statements of 0 which is the same as returning true in this case. I don't think this is the functionality you wanted.