insert
Code:
#include <stdio.h>
char a,b,c,d,e,p1,p2,p3,p4,p5;
void shift(char *p1, char *p2, char *p3, char *p4, char *p5){
char *p6;
*p1 = *p6;
*p2 = *p1;
*p3 = *p2;
*p4 = *p3;
*p5 = *p4;
*p6 = *p5;
}
int main(void){
char a,b,c,d,e,p1,p2,p3,p4,p5;
printf("Please enter 5 different characters: ");
scanf("%c,%c,%c,%c,%c",&a,&b,&c,&d,&e);
printf("\nYou entered: %c%c%c%c%c\nShifting...",a,b,c,d,e);
shift(a,b,c,d,e);
printf("%c%c%c%c%c",p1,p2,p3,p4,p5);
}
Here is my code, its a very simple program to shift 5 stored character values around clockwise, however I keep getting this error message:
insert
Code:
8-6.c: In function `main':
8-6.c:29: warning: passing arg 1 of `shift' makes pointer from integer without a cast
8-6.c:29: warning: passing arg 2 of `shift' makes pointer from integer without a cast
8-6.c:29: warning: passing arg 3 of `shift' makes pointer from integer without a cast
8-6.c:29: warning: passing arg 4 of `shift' makes pointer from integer without a cast
8-6.c:29: warning: passing arg 5 of `shift' makes pointer from integer without a cast
If I could get some help that would be fantastic as well as much appreciated!