My current code is able to read it in but when I try to put it into the frequency table some of the values are incorrect.
unsigned int mFrequencyTable[256] = { 1 };
ifstream bin(mFileName, ios::binary);
int index = 0;
unsigned char val;
unsigned char val2;
if (bin.is_open() == true) {
while (!bin.eof()) {
bin.read((char*)&val, sizeof(char));
while (!bin.eof()) {
bin.read((char*)&val2, sizeof(char));
mFrequencyTable[val2];
index++;
}
break;
}
}