Check if the integral value is negative or not If it is not negative , generate the number normally
if ( s [ 0 ] != ' - ' ) for ( int i = 0 ; i < s . length ( ) ; i ++ ) num = num * 10 + ( int ( s [ i ] ) - 48 ) ;