Extract the imaginary part
while ( i < s1 . length ( ) && isdigit ( s1 [ i ] ) ) { b = b * 10 + ( int ( s1 [ i ] ) - 48 ) ; i ++ ; } if ( sa ) a *= -1 ; if ( sb ) b *= -1 ; v . push_back ( a ) ; v . push_back ( b ) ; return v ; } string complexNumberMultiply ( vector < string > v ) {