Hey DaniWeb, I'm having a tough time with this piece of code:
string encrypt(string e)
{
for( int i=0; e[i] != '\0'; ++i ){
++e[i];
if(e[i] == "{")
{
e[i] = "0";
}
if(e[i] == ":")
{
e[i] = "a"
}
return e;
}
It should "encrypt" the string, using only alpha-numeric characters, as in z+1 = {, so z is converted to 0, and 9+1 = :, so 9 is converted to a. The error I get is 49 C:\Dev-Cpp\files\ver1\main.cpp: ISO C++ forbids comparison between pointer and integer
Can anybody help me with this?
Thanks!