πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by adam Wed, 01 Jul 1998 00:00
pointers and classes
#204
Author: adam
Date: Wed, 01 Jul 1998 00:00
19 lines
1241 bytes

does anyone know how to write a class to represent a variable sized
Stack. This Stack should dynamically grow and shrink with each Push( )
and Pop( ), respectively. maybe by  creating a Node class that
consists of an int and a pointer to the previous int.  Then, the top
of the Stack will be the current Node.  All other elements in the
Stack can be gotten to by Pop( )οΏ½ing off the successive top elements.
When you Push( ) an element on to the Stack, you create a new Node and
assign its previous element pointer to be the former top of Stack. And
to write a program to test the class. I am about to give up, it's due
@ 6:30 am tomorrow and i just keep getting errors and am only a
beginner. 


	any help would be much appreciated,
			thank you,
				adam
i f possible please e-mail anything useful to keropi_@yahoo.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads