Finding the imaginary part of the complex number
string imaginary = s . substr ( i + 1 , l - 1 ) ; int x = stoi ( real ) ; int y = stoi ( imaginary ) ; cout << sqrt ( x * x + y * y ) << " STRNEWLINE " ; }