Changeset 0fe2ca for util


Ignore:
Timestamp:
May 30, 2008, 2:25:02 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
807e8a
Parents:
f7d12e
Message:

atoi() and atof() were replaced by stringstream construct (g++-4.3.0 admonished as cstring was included)

Location:
util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified util/average.cpp

    rf7d12e r0fe2ca  
    1717        int flag;
    1818        string zeile;
     19        stringstream line;
    1920       
    2021        if (argc < 4) {
    2122                cout << "Usage: " << argv[0] << " <firstCol> <lastCol> <X> <File>\n";
    2223                return(1);
    23         }
    24         firstcol = atoi(argv[1]);
    25   lastcol = atoi(argv[2]);
    26   ecut = atof(argv[3]);
     24        }
     25        line.str(argv[1]);
     26  line >> firstcol;
     27  line.clear();
     28  line.str(argv[2]);
     29  line >> lastcol;
     30  line.clear();
     31  line.str(argv[3]);
     32  line >> ecut;
     33  cout << "Going from " << firstcol << " to " << lastcol << " with Ecut of " << ecut << "." << endl;
    2734
    2835        // get average
  • TabularUnified util/stochastik.cpp

    rf7d12e r0fe2ca  
    1717        FILE *test;
    1818        string zeile;
     19        stringstream line;
    1920       
    2021        if (argc < 4) {
     
    2223                return(1);
    2324        }
    24         col = atoi(argv[1]);
    25         ecut = atoi(argv[2]);
     25  line.str(argv[1]);
     26  line >> col;
     27  line.clear();
     28  line.str(argv[2]);
     29  line >> ecut;
     30  cout << "Using " << col << " with Ecut of " << ecut << "." << endl;
    2631
    2732        // get average
Note: See TracChangeset for help on using the changeset viewer.