void encrypt::transform()
{
int length = 0;
char *buffer;
char ch = ' ';
int i = 0;
fileEncrypt.open("filter.txt", ios::in | ios::beg);
fileEncrypt.seekg(0, ios::end);
length = fileEncrypt.tellg();
fileEncrypt.seekg(0, ios::beg);
buffer = new char [length];
fileEncrypt >> ch;
while(!fileEncrypt.eof())
{
buffer[i] = ch;
i++;
fileEncrypt >> ch;
}
for(int j = 0; j < length; j++)
{
buffer[j] = static_cast<int> + 1;
}
}
Everything compiles fine, and Ive tested my dynamic array and it is given the proper size etc... but in my static cast for loop, it is giving me a syntax error upon compile. What am I doing wrong?
Thanks