This code :
...line 6...
#include "FileToVector.h"
#include "VectorToIntArray.h"
#include <string.h>
#include <iostream>
using namespace std;
int main(int argc, char *argv[]){
char* in = argv[1];
FileToVector ftv = FileToVector(in);
vector<char> v = ftv.fileToVector();
VectorToIntArray vt = VectorToIntArray(v);
//int* a = vt.letterFrequencies();
cout<< v.size();
return 0;
}
produces this error :
../FileToExecute.cpp: In function ‘int main(int, char**)’:
../FileToExecute.cpp:17: note: synthesized method ‘FileToVector::FileToVector(const FileToVector&)’ first required here
make: *** [FileToExecute.o] Error 1
there is also this class:
class FileToVector {
private:
fstream file;
char* filename;
public:
FileToVector( char* filenameIn){
//for ( unsigned int i = 0; i < filenameIn.i; i ++){
filename = filenameIn;
//}
//filename[filenameIn.length()] = '\0';
}
vector<char> fileToVector(){
char ch;
vector<char> fileVector;
file.open(filename, ios::in);
while( (ch = file.get()) != EOF){
if ( ch != ' ' && ch != '\n'){
fileVector.push_back(ch);
}
}
file.close();
return fileVector;
}
};
and another one, which does not affect things...
Any ideas?