ok i have a question on how to do something, i'm bad with words so i'll show
the code.
void encrypt(char *string)
{
int i, c;
char buf[MSL];
for(i = 0; string[i] != '\0'; i++)
{
for (c = 0; key_table[c].letter1 != NULL; c++)
{
if (!str_cmp(string[i], key_table[c].letter1))
string[i] = key_table[c].letter2;
}
}
return;
}
and the struct is defined
struct key_type
{
char *letter1;
char *letter2;
};
How to i change string[i] to key_table[c].letter2?
I know this is probly a stupid question but i'm like brain dead ATM. thanks
in advance