Here's a small snippet from my code. Following a Knuth Shuffle model in the Shuffle function, I get 6 Pointer Expected errors in line 15, but I'm sure its really 2 due to the SWAP function in the header. Now the two things I'm swapping are a random index and the i-1 index from the same character array. I'm just confused why a character array isn't being recognized as a pointer already.
#include <stdlib.h>
#include <string.h>
#define SWAP(a,b) {a^=b;b^=a;a^=b;}
#define MAX 60
#define MIN 10
int i;
char input[MAX];
int shuffle (char input)
{
for (i=strlen(&input); i>1; i--)
{
SWAP(input[i-1], input[rand()%i]); // <- This is where the 6 (or 2) Pointer Expectations occur
}
}
int main (void)
{
printf("Please enter a string greater than 10 letters: \n");
scanf(" %s", &input);
printf("You entered:\n");
printf("%s\n", input);
printf("Here's your shuffled string:\n");
printf("%d\n", shuffle(*input));
return 0;
}