S
Santah
hi
I'm new to C++
and I'm currently working on Visual C++ 6.0
I'm trying to open a text file, and read some data from it
part of the text file looks like this:
--------
Stoichiometry C3H7NO
Framework group C1[X(C3H7NO)]
Deg. of freedom 30
Full point group C1 NOp 1
Largest Abelian subgroup C1 NOp 1
Largest concise Abelian subgroup C1 NOp 1
Standard orientation:
---------------------------------------------------------------------
Center Atomic Atomic Coordinates (Angstroms)
Number Number Type X Y Z
---------------------------------------------------------------------
1 7 0 -0.471842 1.385033 -0.179367
2 6 0 -0.441998 0.034984 0.352626
3 1 0 -0.532368 0.028578 1.492181
4 6 0 0.817945 -0.768835 0.128492
5 8 0 1.897598 -0.056037 -0.129721
6 6 0 -1.600140 -0.811575 -0.187269
7 1 0 -1.521476 -1.844231 0.228333
8 1 0 -2.577732 -0.368082 0.117451
9 1 0 -1.563751 -0.866827 -1.300932
10 1 0 0.330252 1.899884 0.122288
11 1 0 -1.306000 1.857479 0.102977
12 1 0 2.638344 -0.681170 -0.232052
---------------------------------------------------------------------
Rotational constants (GHZ): 8.3231162 3.9152127
2.8710745
Isotopes: N-14,C-12,H-1,C-12,O-16,C-12,H-1,H-1,H-1,H-1,H-1,H-1
Standard basis: VSTO-3G (5D, 7F)
There are 27 symmetry adapted basis functions of A symmetry.
Crude estimate of integral set expansion from redundant
integrals=1.000.
--------
what I need, is the values:
1 7 0 -0.471842 1.385033 -0.179367
2 6 0 -0.441998 0.034984 0.352626
3 1 0 -0.532368 0.028578 1.492181
4 6 0 0.817945 -0.768835 0.128492
5 8 0 1.897598 -0.056037 -0.129721
6 6 0 -1.600140 -0.811575 -0.187269
7 1 0 -1.521476 -1.844231 0.228333
8 1 0 -2.577732 -0.368082 0.117451
9 1 0 -1.563751 -0.866827 -1.300932
10 1 0 0.330252 1.899884 0.122288
11 1 0 -1.306000 1.857479 0.102977
12 1 0 2.638344 -0.681170 -0.232052
but I don't know how to fetch them
here's what I've done so far .... (I know that it's not good nor
working )
CFile file1("test.txt", CFile::modeRead );
DWORD dwLen = file1.GetLength();
char *pbuf = new char[dwLen] ;
ffile1.ReadHuge( pbuf, dwLen );
CString sText(pbuf);
delete []pbuf;
// sText.Find("Standard orientation:");
so I have the whole file in a string, and now I need only to get the
needed values from the string but I don't know how
any help is welcomed )
I'm new to C++
and I'm currently working on Visual C++ 6.0
I'm trying to open a text file, and read some data from it
part of the text file looks like this:
--------
Stoichiometry C3H7NO
Framework group C1[X(C3H7NO)]
Deg. of freedom 30
Full point group C1 NOp 1
Largest Abelian subgroup C1 NOp 1
Largest concise Abelian subgroup C1 NOp 1
Standard orientation:
---------------------------------------------------------------------
Center Atomic Atomic Coordinates (Angstroms)
Number Number Type X Y Z
---------------------------------------------------------------------
1 7 0 -0.471842 1.385033 -0.179367
2 6 0 -0.441998 0.034984 0.352626
3 1 0 -0.532368 0.028578 1.492181
4 6 0 0.817945 -0.768835 0.128492
5 8 0 1.897598 -0.056037 -0.129721
6 6 0 -1.600140 -0.811575 -0.187269
7 1 0 -1.521476 -1.844231 0.228333
8 1 0 -2.577732 -0.368082 0.117451
9 1 0 -1.563751 -0.866827 -1.300932
10 1 0 0.330252 1.899884 0.122288
11 1 0 -1.306000 1.857479 0.102977
12 1 0 2.638344 -0.681170 -0.232052
---------------------------------------------------------------------
Rotational constants (GHZ): 8.3231162 3.9152127
2.8710745
Isotopes: N-14,C-12,H-1,C-12,O-16,C-12,H-1,H-1,H-1,H-1,H-1,H-1
Standard basis: VSTO-3G (5D, 7F)
There are 27 symmetry adapted basis functions of A symmetry.
Crude estimate of integral set expansion from redundant
integrals=1.000.
--------
what I need, is the values:
1 7 0 -0.471842 1.385033 -0.179367
2 6 0 -0.441998 0.034984 0.352626
3 1 0 -0.532368 0.028578 1.492181
4 6 0 0.817945 -0.768835 0.128492
5 8 0 1.897598 -0.056037 -0.129721
6 6 0 -1.600140 -0.811575 -0.187269
7 1 0 -1.521476 -1.844231 0.228333
8 1 0 -2.577732 -0.368082 0.117451
9 1 0 -1.563751 -0.866827 -1.300932
10 1 0 0.330252 1.899884 0.122288
11 1 0 -1.306000 1.857479 0.102977
12 1 0 2.638344 -0.681170 -0.232052
but I don't know how to fetch them
here's what I've done so far .... (I know that it's not good nor
working )
CFile file1("test.txt", CFile::modeRead );
DWORD dwLen = file1.GetLength();
char *pbuf = new char[dwLen] ;
ffile1.ReadHuge( pbuf, dwLen );
CString sText(pbuf);
delete []pbuf;
// sText.Find("Standard orientation:");
so I have the whole file in a string, and now I need only to get the
needed values from the string but I don't know how
any help is welcomed )