View Single Post
  #9 (permalink)  
Old March 30th, 2004, 02:19 PM
CNewbie CNewbie is offline
Authorized User
 
Join Date: Mar 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the code that cuases the 2 errors because of the illegal array use with base '8':

Code:
#include <fstream>
#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;

int main()
{ 
    char filedata[200];
    fstream obj1("Log.txt",ios::in);
    fstream obj2("Parsed.txt",ios::out);
    while(!obj1.eof()) {
    obj1.getline(filedata,150);
    obj2 << filedata[00] << filedata[01] << " "
         << filedata[02] << filedata[03] << " "
         << filedata[04] << filedata[05] << " "
         << filedata[06] << filedata[07] << " "
         << filedata[08] << filedata[09] << " "
         << filedata[10] << filedata[11] << endl;
    obj2 << filedata[12] << filedata[13] << endl;
    obj2 << filedata << "\n";
}
    obj1.close(); 
    obj2.close();

return 0;
}
Reply With Quote