Changeset 75793b2 for molecuilder/src/parser.cpp
- Timestamp:
- Jun 7, 2008, 1:20:30 PM (17 years ago)
- Children:
- 42bdb2, a89a22
- Parents:
- a1c448
- File:
-
- 1 edited
-
molecuilder/src/parser.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/parser.cpp
ra1c448 r75793b2 101 101 ifstream input; 102 102 char *FragmentNumber = NULL; 103 stringstream line;103 stringstream file; 104 104 105 105 Header = (char *) Malloc(sizeof(char)*1023, "MatrixContainer::ParseMatrix: *EnergyHeader"); … … 107 107 // count the number of matrices 108 108 MatrixCounter = -1; // we count one too much 109 line << name << FRAGMENTPREFIX << KEYSETFILE;110 input.open( line.str().c_str(), ios::in);109 file << name << FRAGMENTPREFIX << KEYSETFILE; 110 input.open(file.str().c_str(), ios::in); 111 111 if (input == NULL) { 112 cout << endl << "Unable to open " << line.str() << ", is the directory correct?" << endl;112 cout << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl; 113 113 return false; 114 114 } … … 182 182 Matrix[i][j] = (double *) Malloc(sizeof(double)*ColumnCounter, "MatrixContainer::ParseMatrix: *Matrix[][]"); 183 183 input.getline(filename, 1023); 184 stringstream line (filename);184 stringstream lines(filename); 185 185 //cout << "Matrix at level " << j << ":";// << filename << endl; 186 186 for(int k=skipcolumns;k--;) 187 line >> filename;187 lines >> filename; 188 188 for(int k=0;(k<ColumnCounter) && (!line.eof());k++) { 189 line >> Matrix[i][j][k];189 lines >> Matrix[i][j][k]; 190 190 //cout << " " << setprecision(2) << Matrix[i][j][k];; 191 191 } … … 522 522 ifstream input; 523 523 char *FragmentNumber = NULL; 524 stringstream line;524 stringstream file; 525 525 char filename[1023]; 526 526 … … 530 530 for(int i=FragmentCounter;i--;) 531 531 KeySets[i] = NULL; 532 line << name << FRAGMENTPREFIX << KEYSETFILE;533 input.open( line.str().c_str(), ios::in);532 file << name << FRAGMENTPREFIX << KEYSETFILE; 533 input.open(file.str().c_str(), ios::in); 534 534 if (input == NULL) { 535 cout << endl << "Unable to open " << line.str() << ", is the directory correct?" << endl;535 cout << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl; 536 536 return false; 537 537 }
Note:
See TracChangeset
for help on using the changeset viewer.
