πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: att.lang.c++
Article #204

pointers and classes

#204
From: 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
Technical Details
Message-ID: <359a8075.36363367@news.primenet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10d4ba,c12e62a7a9e2ce92,start
X-Google-Attributes: gid10d4ba,public
From: adalubov@primenet.com (adam)
Subject: pointers and classes
Date: 1998/07/01
Message-ID: <359a8075.36363367@news.primenet.com>
X-Deja-AN: 367827468
Organization: Primenet Services for the Internet
X-Posted-By: @208.212.249.80 (adalubov)
Newsgroups: att.lang.c++