T
Tomasz Bednarz
Can someone help me to parse double precision numbers from text file?
I have a sample text file which is as follows:
VARIABLES = x, y
ZONE I=11, J=11
1.10000000000 0.10000000000
0.10000000000 0.20000000000
0.20000000000 0.30000000000
0.30000000000 0.40000000000
0.40000000000 0.50000000000
....
....
The problem is in reading x and y...
I did such function:
istringstream stm;
string lline;
ifstream fp (filename);
if ( fp.is_open() )
{
for (i...
for (j...
{
getline(fp,lline);
stm.str(lline);
stm >> x(i,j) >> y(i,j);
}
....
....
It works only on some files (when using g++) don't know why and doesn't
work at all when using compiler from visual c++ 2005!
Am getting nothing in x(i,j) and y(i,j) (zeros)...
Please give me some suggestions if you could,
kind regards,
Tomasz
I have a sample text file which is as follows:
VARIABLES = x, y
ZONE I=11, J=11
1.10000000000 0.10000000000
0.10000000000 0.20000000000
0.20000000000 0.30000000000
0.30000000000 0.40000000000
0.40000000000 0.50000000000
....
....
The problem is in reading x and y...
I did such function:
istringstream stm;
string lline;
ifstream fp (filename);
if ( fp.is_open() )
{
for (i...
for (j...
{
getline(fp,lline);
stm.str(lline);
stm >> x(i,j) >> y(i,j);
}
....
....
It works only on some files (when using g++) don't know why and doesn't
work at all when using compiler from visual c++ 2005!
Am getting nothing in x(i,j) and y(i,j) (zeros)...
Please give me some suggestions if you could,
kind regards,
Tomasz