Check out example codes for "converting char to int in c++". It will help you in understanding the concepts better.

Code Example 1

#include <sstream>

using namespace std;

int main()
{
    stringstream str;
    
    str << "1";

    double x;
    str >> x;
}

Learn ReactJs, React Native from akashmittal.com