Since stack is a struct stacker object, not a pointer, the -> notation is not correct. The warning about malloc() is because of a missing #include <stdlib.h>.
Since stack is a struct stacker object, not a pointer, the -> notation is not correct. The warning about malloc() is because of a missing #include <stdlib.h>.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)