in one of my functions i create a 2 dimensional array getMessage[6][128] which is 6 lines of input going 128 characters across
i then ask for a number to use as an encryption key
then have to run this array through an encryption algorithm:
encryptedcode= (i- 32 +key)%95 +32)
then ask for the same number which will then decrypt the message.
basically, i'm going to have to access an array i create in another function from another function. Will i need pointers to do this?
Code:
void encode(char getMessage[][])
{
int i;
for (i = 0; i < getMessage[][]; i++)
{
if (getMessage[i] != '\n')
{
getMessage[i] = (getMessage[i] - 32 +key)%95 +32);
}
else
getMessage[i] = 0;
}
}