I am using the STACK ADT which means the data values in the stack are void pointers.
I am having trouble trying to push strings into the stack because of these void pointers.
I understand how int types and char types can be pushed through:
Code:
int* data;
data = (int*)malloc(sizeof(int));
scanf("%d", data);
pushStack (stack, data);
I am getting confused because I can't declare since I have to read in a user's input so i declared
Code:
char data[100];
char ** dataptr;
scanf("%99[^\n], input);
and from then on I am clueless as to what to do