Here is the general idea, will leave you to figure out how to deal with the file work as it will be good for you to learn. fstream will handle all that.
#include <iostream>
#include <fstream>
#include <string>
int main()
{
//Loop through the file and put each number into a string, easy with >> lots of tutorials online
std::string S= "5.80000D+1";
std::size_t Found = S.find("D"); // Could do error checking here to make sure it exists etc
double Number = stod(S.substr(0, Found)); // stod converts string to a double
double Extension = stod(S.substr(Found + 1)); // Skip the D, will be +1 in this case
if(Extension < 0)
{
for(int i = 0; i > Extension; i--)
Number /= 10; // Move the decimal point right
}
else
{
for(int i = 0; i < Extension; i++)
Number *= 10; // Move the decimal point left
}
std::cout << Number << std::endl; // 58
return 0;
}