You can use a generic pointer for pushing items onto the stack but you have to cast it to the proper type before popping them.