Hmm, the program compiles when I fix this error:
Other than that there may be better ways to get the size of the file than getting 150000 characters and then counting how many there actually is.Code:char key[16] = "aeiluozcgraolifi";
//27 initializer-string for array of chars is too long
And then
The length of key was only 16. On my particular run the program didn't crash, but since there apparently were 0-bites beyond key, only the beginning of the text got encrypted.Code:for(x = 0; x < count; x++){
encrypt[x] = file[x] ^ key[x];
}
I would use x%KEYSIZE to get the index for key[] in the loop.