I did below:
if( \'0\' <= infix.at(i)<= \'9\'){ // some logic }
Compiler gave me warning unsafe use of type \'bool\' in operation. I
The first version would be evaluated like this:
if( ( '0' <= infix.at(i) ) <= '9' )
which is why you get a warning about bool - you wind up with true/false <= '9' which doesn't make sense.
bool
true/false <= '9'
Some languages allow you to chain comparison operators, but C++ is not one of them.