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:
I am getting confused because I can't declareCode:int* data; data = (int*)malloc(sizeof(int)); scanf("%d", data); pushStack (stack, data);since I have to read in a user's input so i declaredCode:char* dataand from then on I am clueless as to what to doCode:char data[100]; char ** dataptr; scanf("%99[^\n], input);



LinkBack URL
About LinkBacks


