I am not understanding why this code is wrong, it says lvalue required as increment operand. But isn't planets an array of pointers to strings? so isn't planets++ supposed to take me to the next string. example- planets is a pointer to the string "mercury". When I do planets++ shouldn't it take me to "venus"
#include <stdio.h>
int main()
{
char* planets[] = {"Mercury", "Venus", "Earth","Mars","Jupiter",
" Saturn", "Uranus", "Neptune", "Pluto"};
int count = 0;
for(planets; planets <= planets + 8;planets++){
if(**planets == 'M'){
count++;
}// if
}// for
printf("\n%d",count);
}