// formatting.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char *strnum = NULL; char *strnumret = NULL; char str[80]; double value=0; cout.setf(ios::scientific); strnum = " 5.0012 "; value = atof(strnum); //cout << " first the number: " << value << " now the string " << strnum; //cout << " number " << value << " string " << char ToString(value); printf("%.15f %f", value,value); return 0; }