Hi everyone. I'm stucked in the middle of my programming. I'm trying to read data form the file, and then create the classes as well as feature vector format for that data. E.g my data: 9.8776757 and the output of classes & feature vector format should be: 1 1 : 9.8776757. If you could tell me what should I change, I would be most grateful.
the error occur on (49,15): Illegal use of pointer
Code:
#include <stdio>
#include <iostream>
#include <stdlib>
#include <fstream>
#include <string>
#include <conio>
int main()
{
const int SIZE = 100000;
char input[SIZE];
int lineCount = 1;
int length=0;
string lineBuffer;
ifstream infile;
ofstream outfile;
outfile.open ("schizo_output.dat", ios::out | ios::app);
infile.open ("schizo.dat", ios::in);
if(!infile)
{
cout << "ERROR: Cannot open file.\n";
getch();
return 0;
}
cout << "File is successfully opened! \n";
while (!infile.eof())
{
int count = 1;
count = lineCount;
int counter=0;
int classes=+1;
lineCount ++;
lineCount <<classes;
for(int q=0;q<32;q++)
{
counter++;
}
count <<" "<<lineCount <<":";
infile.getline(input,SIZE);
cout << input << endl;
outfile.close();
}
getch();
return 0;
}
Comment