How to convert std::string to int in C++

we are passing an equation as a string. We are trying to break it down, then format it correctly and finally solve the linear equations. But I'm not able to convert a string to an int.

I know that the String will be in format (-5) or (25) etc. so it's definitely an int. But how to extract that from a string?