🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #563

Re: stos

#563
From: milosz danielewski
Date: Mon, 05 Jan 1998 20:54
34 lines
1386 bytes
On Mon, 5 Jan 1998 12:55:42 +0100, Hubert Iwaniuk
<huberti@venus.wmid.amu.edu.pl> wrote:

>- Czy ktos moze mi podpowiedziec jak to zrobic?
>- Co?
>- A cos takiego:
>	typedef Typ int;
>	struc shead
>		{
>		Typ pole_danej; /*pole do umieszczania danych*/
>		shead *previous; /*wskaznik do poprzedniej struktury
>							shead*/
>		};
>	class stos
>		{
>		private:
>			shead head;
>		public:
>			Stos( void );
>			Stos( const stos );
>			get( void );
>			put( Typ );
>			isvoid( void );
>		};
>
>Tak mniejwiecej ma to wygladac.
>Problem polega na tym jak dodajac nowy elemen stworzyc head tak by
>wskazywal do poprzedniego ( czyli poprzedniego head - jedno i to samo pole
>tej klasy );

 W klasie umiesc wskaznik zamiast elementu, a sam element tworz np. w
konstruktorze.

milosz danielewski
Technical Details
Message-ID: <34b147c1.3097636@news.icm.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!not-for-mail
References: <Pine.OSF.3.95.980105124427.17203B-100000@venus.wmid.amu.edu.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!not-for-mail
From: mdaniel@priv.onet.pl (milosz danielewski)
Newsgroups: pl.comp.lang.c
Subject: Re: stos
Date: Mon, 05 Jan 1998 20:54:13 GMT
Organization: ICM's news server
Lines: 34
Message-ID: <34b147c1.3097636@news.icm.edu.pl>
References: <Pine.OSF.3.95.980105124427.17203B-100000@venus.wmid.amu.edu.pl>
NNTP-Posting-Host: rap-wct360.katowice.tpnet.pl
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.5/32.451
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit