I'm trying to review and figure the issues in the above code. Any inputs to point out problems are welcome.using namespace std;typedef basic_string<char> string;class   CHighLow{public:    CHighLow() : nCurLow(0), nCurHigh(0) {};    void    add(int nHigh, int nLow)    {        if (nHigh > nCurHigh)            nCurHigh = nHigh;        if (nLow < nCurLow)            nCurLow = nLow;    }    int     nCurLow;    int     nCurHigh;};int main(int argc, char* argv[]){    if (!strcmp(version, argv[1]))    {        cerr << Using version 1.0 VWAPer << endl;        return 0;    }    FILE*   file = fopen(argv[2], r);    cerr << Reading file << argv[2] << endl;    char    line[256];    char    Stocks[1000][10];    int     Intervals[1000];    int     Volumes[1000];    float   Highs[1000];    float   Lows[1000];    int     i = 0;    int     sum = 0;    while (fgets(line, 256, file))    {        sscanf(line, %s %d %d %f %f, Stocks[i], &Intervals[i], &Volumes[i], &Highs[i], &Lows[i++]);        cerr << Stocks[i] << endl;        cerr << Intervals[i] << endl;        cerr << Volumes[i] << endl;        cerr << Highs[i] << endl;        cerr << Lows[i] << endl;    }    cerr << Calculating total volumes << endl;    map<std::string, int>       TotalVolumes;    for (int s = 0; s <= i; ++s)    {        std::string stockname = Stocks[s];        for (int j =0; j <= i; ++j)        {            if (!strcmp(Stocks[j], stockname.c_str()))            {                TotalVolumes[stockname] += Volumes[j];            }        }    }    cerr << Calculating high lows << endl;    map<std::string, CHighLow>  HighLows;    for (int s = 0; s <= i; ++s)    {        HighLows[Stocks[s]].add(Highs[s], Lows[s]);    }    cerr << Writing files << endl;    // write file a    for (int s = 0; s <= i; ++s)    {        cout << Stocks[s] << , << Intervals[s] << , << TotalVolumes[Stocks[s]] / Volumes[s] * 100 << endl;    }    // write file b    map<std::string, CHighLow>::iterator itr = HighLows.begin();    while (itr != HighLows.end())    {        cout << (*itr).first << , << (*itr).second.nCurLow << , << (*itr).second.nCurHigh << endl;        ++itr;    }    return 1;}
Calculating highs, lows, and volumes of stocks
c++;performance;finance