High I am in Europe right now and here they treat their commas as decimals points. I am working with Visual express 2008 and I cannot find a way to read a file that has all commas for decimal points. I can read the numbers as a string, but than I need a function to convert it back to numbers and change the commas into decimal points. Anyone have any suggestions?
Please keep in find that I want to keep the file the same way and I don't want to use the find and replace function in the word proccessor to change the commas into decimals.
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib>
using namespace std;
int main()
{
string TIME_SD;
ifstream in("C:\\Dokumente und Einstellungen\\Yaser\\Eigene Dateien\\Internship\\C++_Code\\Data_3.txt");
ofstream out("C:\\Dokumente und Einstellungen\\Yaser
string line;
while( in >> TIME_SD)
{
strrep(in,",",".");
cout << TIME_SD << endl;
}
return 0;
}