A little help on File reading? Not a big prob :)
Okay, so I'm making a decryption\encryption proggy.(only decrypts its own encryption for now). And I want it to enter the file, view the letters, and change them 1 by 1. Here's the code for doing it so far(yes I have defined how to get the file name):
ofstream fout;
ifstream fin;
int i;
fin.open(file);
fin>>file;
for(i = 0; file[i]; i++)
{
if(file[i] = "h")\\error occurs here
{
file[i] = "ô";
}
if(file[i] = "a")\\error occurs here
{
file[i] = "§";
}
}
fin.close();
return* file;
it gives me this error: Cannot convert char[2] to char
twice, i have marked it in my code. Plz tell me how to fix it. thx