How Can I Rewrite Without Stod() : <p>How can I rewrite my <strong>readDetails</strong> function without using <strong>stod()</strong> or <strong>strtod()</strong> in <strong>C++</strong>?
The compiler I will be using doesn't have c++11 enabled and I get</p>

<p>'stod' was not declared in this scope error</p>

<pre><code>int readDetails(SmallRestaurant sr[])
{
//Declaration
ifstream inf;

//Open file
inf.open("pop_density.txt");

//Check condition
if (!inf)
{
    //Display
    cout &lt;&lt; "Input file is not found!" &lt;&lt; endl;

    //Pause
    system("pause");

    //Exit on failure
    exit(EXIT_FAILURE);
}

//Declarations and initializations
string fLine;
int counter = 0;
int loc = -1;

//Read
getline(inf, fLine);

//Loop
while (inf)
{
    //File read
    loc = fLine.find('|');
    sr[counter].nameInFile = fLine.substr(0, loc);
    fLine = fLine.substr(loc + 1);
    loc = fLine.find('|');
    sr[counter].areaInFile = stod(fLine.substr(0, loc));  //line using stod
    fLine = fLine.substr(loc + 1);
    loc = fLine.find('|');
    sr[counter].popInFile = stoi(fLine.substr(0, loc));
    fLine = fLine.substr(loc + 1);
    sr[counter].densityInFile = stod(fLine);   //line using stod
    counter++;
    getline(inf, fLine);
}

//Return
return counter;
}
</code></pre>

<p>Below is the text I am trying to read:</p>

<p>Census Tract 201, Autauga County, Alabama|9.84473419420788|1808|183.651479494869
Census Tract 202, Autauga County, Alabama|3.34583234555866|2355|703.860730836106
Census Tract 203, Autauga County, Alabama|5.35750339330735|3057|570.60159846447</p>
