I had an slightly different problem, but it fits the headline.
atof looked like rounding to integer part and it wasn't a output precision problem.
My solution was to change the locale settings of my ubuntu installation.
Decimals were separated by comma instead of point.
try this code (comma instead of point):
double latitude=atof("14718,5084");
std::cout <<"latitude test "<<latitude<< "\n";
if it outputs the correct floating point number (maybe separated by point), you should change your locale settings to english or work with comma floating values in your data (e.g. german locale settings)