Im trying to read the whole file.txt into a char array. But having some issues, suggestions please =]
ifstream infile;
infile.open("file.txt");
char getdata[10000]
while (!infile.eof()){
infile.getline(getdata,sizeof(infile));
// if i cout here it looks fine
//cout << getdata << endl;
}
//but this outputs the last half of the file + trash
for (int i=0; i<10000; i++){
cout << getdata[i]
}